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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Shawn O. Pearce" <spearce@xxxxxxxxxxx> writes:

> Jonathan Nieder <jrnieder@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]