Skip to content

Commit 74fbd11

Browse files
spearcegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 63cb821 commit 74fbd11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Documentation/git-fast-import.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ change to the project.
311311
....
312312
'commit' SP <ref> LF
313313
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
316316
data
317317
('from' SP <committish> LF)?
318318
('merge' SP <committish> LF)?
@@ -657,7 +657,7 @@ lightweight (non-annotated) tags see the `reset` command below.
657657
....
658658
'tag' SP <name> LF
659659
'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
661661
data
662662
....
663663

fast-import.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Format of STDIN stream:
1919
2020
new_commit ::= 'commit' sp ref_str lf
2121
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
2424
commit_msg
2525
('from' sp committish lf)?
2626
('merge' sp committish lf)*
@@ -47,7 +47,7 @@ Format of STDIN stream:
4747
4848
new_tag ::= 'tag' sp tag_str lf
4949
'from' sp committish lf
50-
('tagger' sp name sp '<' email '>' sp when lf)?
50+
('tagger' (sp name)? sp '<' email '>' sp when lf)?
5151
tag_msg;
5252
tag_msg ::= data;
5353

0 commit comments

Comments
 (0)