aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-fast-import.txt
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-08-01 02:22:53 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-08-19 03:38:35 -0400
commit1fdb649c6ac4cfc536983077b4851a1959cbc1c4 (patch)
treedcee335dd683ce048e2bd263d73602528e5b9967 /Documentation/git-fast-import.txt
parent2c570cde98cfde704ee67ea29031493c633f971e (diff)
downloadgit-1fdb649c6ac4cfc536983077b4851a1959cbc1c4.tar.gz
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>
Diffstat (limited to 'Documentation/git-fast-import.txt')
-rw-r--r--Documentation/git-fast-import.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index eb0c8c48ee..1644b90cea 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -312,7 +312,7 @@ change to the project.
('from' SP <committish> LF)?
('merge' SP <committish> LF)?
(filemodify | filedelete | filecopy | filerename | filedeleteall)*
- LF
+ LF?
....
where `<ref>` is the name of the branch to make the commit on.
@@ -343,6 +343,8 @@ all `filemodify`, `filecopy` and `filerename` commands in the same
commit, as `filedeleteall`
wipes the branch clean (see below).
+The `LF` after the command is optional (it used to be required).
+
`author`
^^^^^^^^
An `author` command may optionally appear, if the author information
@@ -654,12 +656,14 @@ branch from an existing commit without creating a new commit.
....
'reset' SP <ref> LF
('from' SP <committish> LF)?
- LF
+ LF?
....
For a detailed description of `<ref>` and `<committish>` see above
under `commit` and `from`.
+The `LF` after the command is optional (it used to be required).
+
The `reset` command can also be used to create lightweight
(non-annotated) tags. For example:
@@ -750,7 +754,7 @@ save out all current branch refs, tags and marks.
....
'checkpoint' LF
- LF
+ LF?
....
Note that fast-import automatically switches packfiles when the current
@@ -769,6 +773,7 @@ process access to a branch. However given that a 30 GiB Subversion
repository can be loaded into Git through fast-import in about 3 hours,
explicit checkpointing may not be necessary.
+The `LF` after the command is optional (it used to be required).
Tips and Tricks
---------------