'reset' SP <ref> LF ('from' SP <committish> LF)? - LF+ LF?
From: Junio C Hamano
To aid in debugging frontends fast-import ignores any line that +begins with # (ASCII pound/hash) up to and including the line +ending LF. A comment line may contain any sequence of bytes +that does not contain an LF and therefore may be used to include +any detailed debugging information that might be specific to the +frontend and useful when inspecting a fast-import data stream.
The following date formats are supported. A frontend should select the format it will use for this import by passing the format name @@ -620,6 +627,16 @@ and control the current import process. More detailed discussion an import.
++ Causes fast-import to echo the entire line to its own + standard output. This command is optional and is not needed + to perform an import. +
+Create or update a branch with a new commit, recording one logical @@ -634,7 +651,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. Typically branch names are prefixed with refs/heads/ in @@ -660,6 +677,7 @@ However it is recommended that a filedeleteall command preceed 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).
An author command may optionally appear, if the author information might differ from the committer information. If author is omitted @@ -971,10 +989,11 @@ 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:
Comment lines appearing within the <raw> part of data commands +are always taken to be part of the body of the data and are therefore +never ignored by fast-import. This makes it safe to import any +file/message content whose lines might start with #.
'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.
'data' SP '<<' <delim> LF <raw> LF - <delim> LF+ <delim> LF + LF?
where <delim> is the chosen delimiter string. The string <delim> must not appear on a line by itself within <raw>, as otherwise @@ -1049,6 +1077,7 @@ fast-import will think the data ends earlier than it really does. The LF<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' LF - LF+ LF?
Note that fast-import automatically switches packfiles when the current packfile reaches --max-pack-size, or 4 GiB, whichever limit is @@ -1072,6 +1101,31 @@ and long running imports, or when they need to allow another Git 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).
+Causes fast-import to print the entire progress line unmodified to +its standard output channel (file descriptor 1) when the command is +processed from the input stream. The command otherwise has no impact +on the current import, or on any of fast-import's internal state.
+'progress' SP <any> LF + LF?+
The <any> part of the command may contain any sequence of bytes +that does not contain LF. The LF after the command is optional. +Callers may wish to process the output through a tool such as sed to +remove the leading part of the line, for example:
+frontend | git-fast-import | sed 's/^progress //'+
Placing a progress command immediately after a checkpoint will +inform the reader when the checkpoint has been completed and it +can safely access the refs that fast-import updated.
Every once in a while have your frontend emit a progress message +to fast-import. The contents of the messages are entirely free-form, +so one suggestion would be to output the current month and year +each time the current commit date moves into the next month. +Your users will feel better knowing how much of the data stream +has been processed.