author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 1 Aug 2007 04:05:15 +0000 (00:05 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 19 Aug 2007 07:38:35 +0000 (03:38 -0400) | ||
commit | 401d53fa35098266e2a4a904a4598b59f1b74663 | |
tree | 70e940a52cbe7e9ff73bb95b97568bdf971269c3 | tree | snapshot |
parent | 3149007475f8c38ee66b448af9c55fc102534c46 | commit | diff |
Teach fast-import to ignore lines starting with '#'
Several frontend developers have asked that some form of stream
comments be permitted within a fast-import data stream. This way
they can include information from their own frontend program about
where specific data was taken from in the source system, or about
a decision that their frontend may have made while creating the
fast-import data stream.
This change introduces comments in the Bourne-shell/Tcl/Perl style.
Lines starting with '#' are ignored, up to and including the LF.
Unlike the above mentioned three languages however we do not look for
and ignore leading whitespace. This just simplifies the definition
of the comment format and the code that parses them.
To make comments work we had to stop using read_next_command() within
cmd_data() and directly invoke read_line() during the inline variant
of the function. This is necessary to retain any lines of the
input data that might otherwise look like a comment to fast-import.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Several frontend developers have asked that some form of stream
comments be permitted within a fast-import data stream. This way
they can include information from their own frontend program about
where specific data was taken from in the source system, or about
a decision that their frontend may have made while creating the
fast-import data stream.
This change introduces comments in the Bourne-shell/Tcl/Perl style.
Lines starting with '#' are ignored, up to and including the LF.
Unlike the above mentioned three languages however we do not look for
and ignore leading whitespace. This just simplifies the definition
of the comment format and the code that parses them.
To make comments work we had to stop using read_next_command() within
cmd_data() and directly invoke read_line() during the inline variant
of the function. This is necessary to retain any lines of the
input data that might otherwise look like a comment to fast-import.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Documentation/git-fast-import.txt | diff | blob | history | |
fast-import.c | diff | blob | history | |
t/t9300-fast-import.sh | diff | blob | history |