From: "Shawn O. Pearce" <spearce@spearce.org>
To: David Reiss <dreiss@facebook.com>, Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: [PATCH] fast-import: Document author/committer/tagger name is optional
Date: Wed, 30 Dec 2009 07:03:48 -0800 [thread overview]
Message-ID: <20091230150348.GF6914@spearce.org> (raw)
In-Reply-To: <4B3AED66.3030803@facebook.com>
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>
---
David Reiss <dreiss@facebook.com> wrote:
> >> author <somename> 1261454209 +0000
> >> committer <somename> 1261454209 +0000
> > a foreign system where the data might not reasonably exist.
> But shouldn't there still be an extra space? One to separate "author"
> from the empty name, and one to separate the empty name from the email?
> If not, then I think this change should be made. (I couldn't find any
> authoritative documentation on what constitutes a valid commit object.)
Yes, we should do this.
Documentation/git-fast-import.txt | 6 +++---
fast-import.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 288032c..e6d364f 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -311,8 +311,8 @@ change to the project.
....
'commit' SP <ref> LF
mark?
- ('author' SP <name> SP LT <email> GT SP <when> LF)?
- 'committer' SP <name> SP LT <email> GT SP <when> LF
+ ('author' (SP <name>)? SP LT <email> GT SP <when> LF)?
+ 'committer' (SP <name>)? SP LT <email> GT SP <when> LF
data
('from' SP <committish> LF)?
('merge' SP <committish> LF)?
@@ -657,7 +657,7 @@ lightweight (non-annotated) tags see the `reset` command below.
....
'tag' SP <name> LF
'from' SP <committish> LF
- 'tagger' SP <name> SP LT <email> GT SP <when> LF
+ 'tagger' (SP <name>)? SP LT <email> GT SP <when> LF
data
....
diff --git a/fast-import.c b/fast-import.c
index dd3c99d..cd87049 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -19,8 +19,8 @@ Format of STDIN stream:
new_commit ::= 'commit' sp ref_str lf
mark?
- ('author' sp name sp '<' email '>' sp when lf)?
- 'committer' sp name sp '<' email '>' sp when lf
+ ('author' (sp name)? sp '<' email '>' sp when lf)?
+ 'committer' (sp name)? sp '<' email '>' sp when lf
commit_msg
('from' sp committish lf)?
('merge' sp committish lf)*
@@ -47,7 +47,7 @@ Format of STDIN stream:
new_tag ::= 'tag' sp tag_str lf
'from' sp committish lf
- ('tagger' sp name sp '<' email '>' sp when lf)?
+ ('tagger' (sp name)? sp '<' email '>' sp when lf)?
tag_msg;
tag_msg ::= data;
--
1.6.6.307.gba67
--
Shawn.
next prev parent reply other threads:[~2009-12-30 15:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 4:22 git fast-import not verifying commit author lines? David Reiss
2009-12-22 15:06 ` Shawn O. Pearce
2009-12-30 6:04 ` David Reiss
2009-12-30 15:03 ` Shawn O. Pearce [this message]
2009-12-31 23:08 ` [PATCH] fast-import: Document author/committer/tagger name is optional Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091230150348.GF6914@spearce.org \
--to=spearce@spearce.org \
--cc=dreiss@facebook.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).