{"thread":{"id":"22003","subject":"git fast-import not verifying commit author lines?","startedAt":"2009-12-22T04:22:31Z","lastAt":"2009-12-31T23:08:37Z","messageCount":5,"participants":["David Reiss","Shawn O. Pearce","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"130233","messageId":"4B304987.7030201@facebook.com","threadId":"22003","inReplyTo":null,"subject":"git fast-import not verifying commit author lines?","fromName":"David Reiss","fromEmail":"dreiss@facebook.com","sentAt":"2009-12-22T04:22:31Z","receivedAt":"2009-12-22T04:22:31Z","isPatch":false,"sender":{"key":"dreiss@facebook.com","avatar":null},"body":"mtn git_export produces this output on a simple repo:\n\nblob\nmark :1\ndata 8\ncontent\n\ncommit refs/heads/com.example.badexport\nmark :2\nauthor <somename> 1261454209 +0000\ncommitter <somename> 1261454209 +0000\ndata 8\nacommit\n\nM 100644 :1 \"afile\"\nprogress revision 9b0e11e4d66eba8a3cf26095fb573116b886cd37 (1/1)\n#############################################################\n\nThe author and committer lines are missing the names (I've filed this as a\nbug with monotone).  git commit-tree refuses to to produce a commit object\nlike this, so it seems like git fast-import should detect and report this\ninstead of silently writing the invalid commit object to the repository.\n\n--David\n"},{"id":"130239","messageId":"20091222150649.GI10687@spearce.org","threadId":"22003","inReplyTo":"4B304987.7030201@facebook.com","subject":"Re: git fast-import not verifying commit author lines?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-12-22T15:06:49Z","receivedAt":"2009-12-22T15:06:49Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"David Reiss <dreiss@facebook.com> wrote:\n> mtn git_export produces this output on a simple repo:\n> \n> blob\n> mark :1\n> data 8\n> content\n> \n> commit refs/heads/com.example.badexport\n> mark :2\n> author <somename> 1261454209 +0000\n> committer <somename> 1261454209 +0000\n> data 8\n> acommit\n> \n> M 100644 :1 \"afile\"\n> progress revision 9b0e11e4d66eba8a3cf26095fb573116b886cd37 (1/1)\n> #############################################################\n> \n> The author and committer lines are missing the names (I've filed this as a\n> bug with monotone).  git commit-tree refuses to to produce a commit object\n> like this, so it seems like git fast-import should detect and report this\n> instead of silently writing the invalid commit object to the repository.\n\nNope.\n\nThese objects can still be processed by git commands, you just can't\nnormally create them with Git tools.  To some extent fast-import\nallows the caller to import data that you wouldn't otherwise create\nin Git because we know you are coming from a foreign system where\nthe data might not reasonably exist.\n\n-- \nShawn.\n"},{"id":"130519","messageId":"4B3AED66.3030803@facebook.com","threadId":"22003","inReplyTo":"20091222150649.GI10687@spearce.org","subject":"Re: git fast-import not verifying commit author lines?","fromName":"David Reiss","fromEmail":"dreiss@facebook.com","sentAt":"2009-12-30T06:04:22Z","receivedAt":"2009-12-30T06:04:22Z","isPatch":false,"sender":{"key":"dreiss@facebook.com","avatar":null},"body":">> author <somename> 1261454209 +0000\n>> committer <somename> 1261454209 +0000\n> a foreign system where the data might not reasonably exist.\nBut shouldn't there still be an extra space?  One to separate \"author\"\nfrom the empty name, and one to separate the empty name from the email?\nIf not, then I think this change should be made.  (I couldn't find any\nauthoritative documentation on what constitutes a valid commit object.)\n\n(Sorry, this has been sitting in my outbox for a week.)\n\n--David\n\ndiff --git i/Documentation/git-fast-import.txt w/Documentation/git-fast-import.txt\nindex 288032c..6917739 100644\n--- i/Documentation/git-fast-import.txt\n+++ w/Documentation/git-fast-import.txt\n@@ -312,6 +312,6 @@ change to the project.\n        'commit' SP <ref> LF\n        mark?\n-       ('author' SP <name> SP LT <email> GT SP <when> LF)?\n-       'committer' SP <name> SP LT <email> GT SP <when> LF\n+       ('author' (SP <name>)? SP LT <email> GT SP <when> LF)?\n+       'committer' (SP <name>)? SP LT <email> GT SP <when> LF\n        data\n        ('from' SP <committish> LF)?\n"},{"id":"130562","messageId":"20091230150348.GF6914@spearce.org","threadId":"22003","inReplyTo":"4B3AED66.3030803@facebook.com","subject":"[PATCH] fast-import: Document author/committer/tagger name is optional","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-12-30T15:03:48Z","receivedAt":"2009-12-30T15:03:48Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"The fast-import parser does not validate that the author, committer\nor tagger name component contains both a name and an email address.\nTherefore the name component has always been optional.  Correct the\ndocumentation to match the implementation.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n   David Reiss <dreiss@facebook.com> wrote:\n   > >> author <somename> 1261454209 +0000\n   > >> committer <somename> 1261454209 +0000\n   > > a foreign system where the data might not reasonably exist.\n   > But shouldn't there still be an extra space?  One to separate \"author\"\n   > from the empty name, and one to separate the empty name from the email?\n   > If not, then I think this change should be made.  (I couldn't find any\n   > authoritative documentation on what constitutes a valid commit object.)\n   \n   Yes, we should do this.\n    \n Documentation/git-fast-import.txt |    6 +++---\n fast-import.c                     |    6 +++---\n 2 files changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt\nindex 288032c..e6d364f 100644\n--- a/Documentation/git-fast-import.txt\n+++ b/Documentation/git-fast-import.txt\n@@ -311,8 +311,8 @@ change to the project.\n ....\n \t'commit' SP <ref> LF\n \tmark?\n-\t('author' SP <name> SP LT <email> GT SP <when> LF)?\n-\t'committer' SP <name> SP LT <email> GT SP <when> LF\n+\t('author' (SP <name>)? SP LT <email> GT SP <when> LF)?\n+\t'committer' (SP <name>)? SP LT <email> GT SP <when> LF\n \tdata\n \t('from' SP <committish> LF)?\n \t('merge' SP <committish> LF)?\n@@ -657,7 +657,7 @@ lightweight (non-annotated) tags see the `reset` command below.\n ....\n \t'tag' SP <name> LF\n \t'from' SP <committish> LF\n-\t'tagger' SP <name> SP LT <email> GT SP <when> LF\n+\t'tagger' (SP <name>)? SP LT <email> GT SP <when> LF\n \tdata\n ....\n \ndiff --git a/fast-import.c b/fast-import.c\nindex dd3c99d..cd87049 100644\n--- a/fast-import.c\n+++ b/fast-import.c\n@@ -19,8 +19,8 @@ Format of STDIN stream:\n \n   new_commit ::= 'commit' sp ref_str lf\n     mark?\n-    ('author' sp name sp '<' email '>' sp when lf)?\n-    'committer' sp name sp '<' email '>' sp when lf\n+    ('author' (sp name)? sp '<' email '>' sp when lf)?\n+    'committer' (sp name)? sp '<' email '>' sp when lf\n     commit_msg\n     ('from' sp committish lf)?\n     ('merge' sp committish lf)*\n@@ -47,7 +47,7 @@ Format of STDIN stream:\n \n   new_tag ::= 'tag' sp tag_str lf\n     'from' sp committish lf\n-    ('tagger' sp name sp '<' email '>' sp when lf)?\n+    ('tagger' (sp name)? sp '<' email '>' sp when lf)?\n     tag_msg;\n   tag_msg ::= data;\n \n-- \n1.6.6.307.gba67\n\n-- \nShawn.\n"},{"id":"130639","messageId":"7vhbr6rbbe.fsf@alter.siamese.dyndns.org","threadId":"22003","inReplyTo":"20091230150348.GF6914@spearce.org","subject":"Re: [PATCH] fast-import: Document author/committer/tagger name is optional","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-31T23:08:37Z","receivedAt":"2009-12-31T23:08:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n>    David Reiss <dreiss@facebook.com> wrote:\n>    > >> author <somename> 1261454209 +0000\n>    > >> committer <somename> 1261454209 +0000\n>    > > a foreign system where the data might not reasonably exist.\n>    > But shouldn't there still be an extra space?  One to separate \"author\"\n>    > from the empty name, and one to separate the empty name from the email?\n>    > If not, then I think this change should be made.  (I couldn't find any\n>    > authoritative documentation on what constitutes a valid commit object.)\n>    \n>    Yes, we should do this.\n\nThanks.\n"}]}