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 /Documentation/git-fast-import.txt | |
parent | 401d53fa35098266e2a4a904a4598b59f1b74663 (diff) | |
download | git-2c570cde98cfde704ee67ea29031493c633f971e.tar.gz |
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 'Documentation/git-fast-import.txt')
-rw-r--r-- | Documentation/git-fast-import.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt index a92ae6d1a3..eb0c8c48ee 100644 --- a/Documentation/git-fast-import.txt +++ b/Documentation/git-fast-import.txt @@ -708,13 +708,18 @@ Exact byte count format:: + .... 'data' SP <count> LF - <raw> LF + <raw> LF? .... + where `<count>` is the exact number of bytes appearing within `<raw>`. The value of `<count>` is expressed as an ASCII decimal integer. The `LF` on either side of `<raw>` is not included in `<count>` and will not be included in the imported data. ++ +The `LF` after `<raw>` is optional (it used to be required) but +recommended. Always including it makes debugging a fast-import +stream easier as the next command always starts in column 0 +of the next line, even if `<raw>` did not end with an `LF`. Delimited format:: A delimiter string is used to mark the end of the data. @@ -726,6 +731,7 @@ Delimited format:: 'data' SP '<<' <delim> LF <raw> LF <delim> LF + LF? .... + where `<delim>` is the chosen delimiter string. The string `<delim>` @@ -734,6 +740,8 @@ fast-import will think the data ends earlier than it really does. The `LF` immediately trailing `<raw>` is part of `<raw>`. This is one of the limitations of the delimited format, it is impossible to supply a data chunk which does not have an LF as its last byte. ++ +The `LF` after `<delim> LF` is optional (it used to be required). `checkpoint` ~~~~~~~~~~~~ |