git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] fast-import: validate entire ident string

From
Junio C Hamano <gitster@pobox.com>
Date
May 4, 2010, 17:11 UTC
Message-ID
<7vk4rjmw26.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100426160247.GD7502@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 18 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> wrote:
>> The author, committer, and tagger name and email should not include
>> any embedded <, >, or newline characters.  The format of the
>> identification string is
>> 
>>   ('author'|'committer'|'tagger') sp name sp < email > sp date
>> 
>> If an object has no name attached, then git expects to find two spaces
>> in a row.
>
> This is going to be a problem I think.  Some importers are probably
> writing "committer <bob> ...." when pulling from systems that don't
> have a concept of name vs. email (e.g. CVS or SVN).  I highly suspect
> that requiring two spaces here will cause a lot of importers to fail.
>
> If we really need to require two spaces, I think we need to honor
> the documented input format but rewrite the line inside of the
> import process to match the two space convention.

It probably should document [sp name] (or [name sp]) an "zero or one" item, if we want to be lenient.

I also think it may not be such a bad idea to allow fast-import to add a phoney "name" by taking everything in e-mail before the first '@', just like how the git-cvsimport and git-svn does, when the input stream does not have a "name". I am not sure how usable "shortlog" output would be otherwise, without any "name" field.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 11 of 13 in “fast-import docs: LT is valid in email, GT is not”
  1. fast-import docs: LT is valid in email, GT is notMark Lodato, Apr 24, 2010
  2. fsck: check ident lines in commit objectsJonathan Nieder, Apr 24, 2010
  3. Jonathan NiederApr 24, 2010
  4. Shawn O. PearceApr 24, 2010
  5. 0/2 fast-import: tighten up parsing ident lineJonathan Nieder, Apr 24, 2010
  6. 1/2 fast-import: be strict about formatting of raw datesJonathan Nieder, Apr 24, 2010
  7. 2/2 fast-import: validate entire ident stringJonathan Nieder, Apr 24, 2010
  8. Shawn O. PearceApr 26, 2010
  9. Jonathan NiederApr 26, 2010
  10. Jonathan NiederApr 26, 2010
  11. Junio C HamanoMay 4, 2010
  12. Jonathan NiederApr 24, 2010
  13. Mark LodatoApr 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.