diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-08-01 00:24:25 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-08-19 03:38:35 -0400 |
commit | 2c570cde98cfde704ee67ea29031493c633f971e (patch) | |
tree | 01b2aab3fe8da779ecaed3baa7246d87f7ae0fa8 /t/t9300-fast-import.sh | |
parent | 401d53fa35098266e2a4a904a4598b59f1b74663 (diff) | |
download | git-2c570cde98cfde704ee67ea29031493c633f971e.tar.gz git-2c570cde98cfde704ee67ea29031493c633f971e.tar.xz |
Make trailing LF following fast-import `data` commands optional
A few fast-import frontend developers have found it odd that we
require the LF following a `data` command, especially in the exact
byte count format. Technically we don't need this LF to parse
the stream properly, but having it here does make the stream more
readable to humans. We can easily make the LF optional by peeking
at the next byte available from the stream and pushing it back into
the buffer if its not LF.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-x | t/t9300-fast-import.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 1f6426a49..5be6f196b 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -818,4 +818,25 @@ test_expect_success \ 'git-fast-import <input && test `git-rev-parse N3` = `git-rev-parse O1`' +cat >input <<INPUT_END +commit refs/heads/O2 +committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE +data <<COMMIT +dirty directory copy +COMMIT +from refs/heads/branch^0 +M 644 inline file2/file5 +data <<EOF +$file5_data +EOF +C file2 file3 +D file2/file5 + +INPUT_END + +test_expect_success \ + 'O: blank lines not necessary after data commands' \ + 'git-fast-import <input && + test `git-rev-parse N3` = `git-rev-parse O2`' + test_done |