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

Re: [PATCH] fast-import docs: LT is valid in email, GT is not

From
Mark Lodato <lodatom@gmail.com>
Date
Apr 24, 2010, 16:59 UTC
Message-ID
<i2hca433831004240959s227a96as2caf523da94dff51@mail.gmail.com>
In-Reply-To
<20100424161236.GB14690@progeny.tock>
On Sat, Apr 24, 2010 at 12:12 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 14 quoted lines
> Mark Lodato wrote:
>> +++ b/Documentation/git-fast-import.txt
>> @@ -394,7 +394,7 @@ Here `<name>` is the person's display name (for example
>>  and greater-than (\x3e) symbols.  These are required to delimit
>>  the email address from the other fields in the line.  Note that
>>  `<name>` is free-form and may contain any sequence of bytes, except
>> -`LT` and `LF`.  It is typically UTF-8 encoded.
>> +`GT` and `LF`.  It is typically UTF-8 encoded.
>
>        Here <name> is the person’s display name (for example
>        “Com M Itter”)
>
> So the original text is correct --- a <name> cannot contain LT because
> a less-than sign marks the boundary between a name and email address.
Ah, you're right, sorry.  I thought it was <email>, not <name>.
Show 8 quoted lines
> Maybe you were wondering what characters are valid in an e-mail address?
> The comments in fast-import.c and code in ident.c are consistent about
> this: the forbidden characters are <, >, and LF, though no one seems to
> check (see also my other reply).  A patch to explain this (including a
> reference to git-commit-tree(1), I guess) might be useful.
>
> git won’t understand an email with embedded > or LF.  I’m not sure a <
> would cause problems, but I don’t mind that it is disallowed.

It seems like it would be good to disallow <, >, and LF in both name and email. With your other patch, > is allowed in the name.

Thanks for the clarification, Mark

Previous: Jonathan Nieder
Message 13 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.