]> git.ipfire.org Git - thirdparty/git.git/commit - t/t9300-fast-import.sh
Make trailing LF optional for all fast-import commands
authorShawn O. Pearce <spearce@spearce.org>
Wed, 1 Aug 2007 06:22:53 +0000 (02:22 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 19 Aug 2007 07:38:35 +0000 (03:38 -0400)
commit1fdb649c6ac4cfc536983077b4851a1959cbc1c4
treedcee335dd683ce048e2bd263d73602528e5b9967
parent2c570cde98cfde704ee67ea29031493c633f971e
Make trailing LF optional for all fast-import commands

For the same reasons as the prior change we want to allow frontends
to omit the trailing LF that usually delimits commands.  In some
cases these just make the input stream more verbose looking than
it needs to be, and its just simpler for the frontend developer to
get started if our parser is slightly more lenient about where an
LF is required and where it isn't.

To make this optional LF feature work we now have to buffer up to one
line of input in command_buf.  This buffering can happen if we look
at the current input command but don't recognize it at this point
in the code.  In such a case we need to "unget" the entire line,
but we cannot depend upon the stdio library to let us do ungetc()
for that many characters at once.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Documentation/git-fast-import.txt
fast-import.c
t/t9300-fast-import.sh