@matheusbsbs / matheus-bagliano / commits / 74fbd1182a
Fork 0

fast-import: Document author/committer/tagger name is optional

The fast-import parser does not validate that the author, committer or tagger name component contains both a name and an email address. Therefore the name component has always been optional. Correct the documentation to match the implementation. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Shawn O. Pearce committed Dec 30, 2009 at 07:03 UTC 74fbd1182a8300dd0a1d788120813b6d5b9e5cb6
2 files changed +6 -6
Documentation/git-fast-import.txt
+3 -3
@@ -311,8 +311,8 @@ change to the project.
311 ....
312 'commit' SP <ref> LF
313 mark?
314 - ('author' SP <name> SP LT <email> GT SP <when> LF)?
315 - 'committer' SP <name> SP LT <email> GT SP <when> LF
314 + ('author' (SP <name>)? SP LT <email> GT SP <when> LF)?
315 + 'committer' (SP <name>)? SP LT <email> GT SP <when> LF
316 data
317 ('from' SP <committish> LF)?
318 ('merge' SP <committish> LF)?
@@ -657,7 +657,7 @@ lightweight (non-annotated) tags see the `reset` command below.
657 ....
658 'tag' SP <name> LF
659 'from' SP <committish> LF
660 - 'tagger' SP <name> SP LT <email> GT SP <when> LF
660 + 'tagger' (SP <name>)? SP LT <email> GT SP <when> LF
661 data
662 ....
663
fast-import.c
+3 -3
@@ -19,8 +19,8 @@ Format of STDIN stream:
19
20 new_commit ::= 'commit' sp ref_str lf
21 mark?
22 - ('author' sp name sp '<' email '>' sp when lf)?
23 - 'committer' sp name sp '<' email '>' sp when lf
22 + ('author' (sp name)? sp '<' email '>' sp when lf)?
23 + 'committer' (sp name)? sp '<' email '>' sp when lf
24 commit_msg
25 ('from' sp committish lf)?
26 ('merge' sp committish lf)*
@@ -47,7 +47,7 @@ Format of STDIN stream:
47
48 new_tag ::= 'tag' sp tag_str lf
49 'from' sp committish lf
50 - ('tagger' sp name sp '<' email '>' sp when lf)?
50 + ('tagger' (sp name)? sp '<' email '>' sp when lf)?
51 tag_msg;
52 tag_msg ::= data;
53