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

Re: [PATCH 5/6] More accurately detect header lines in read_one_header_line

From
Eric W. Biederman <ebiederm@xmission.com>
Date
May 26, 2006, 08:16 UTC
Message-ID
<m1d5e1ciav.fsf@ebiederm.dsl.xmission.com>
In-Reply-To
<7vr72hns7h.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 5 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
>
>> Was there a particular reason you needed this change?  That is,
>> did you have to parse mail-looking input that does not have a
>> blank line between runs of headers and the body of the message?

Yes. I had patches that had a subject line followed by a blank line, and the problem was that the old check thought the subject was a header line, despite not even having a colon in it.

Show 5 quoted lines
>> If so, I'd at least like to remove the || !isspace(colon[1])
>> from the test.  After all, I do not think RFC2822 requires a
>> whitespace after the colon there.
>
> In other words, something like this (tested):
Looks good to me, sorry for missing that one.
Eric
Previous: Junio C Hamano
Message 10 of 10 in “Detect non email patches in git-mailinfo”
  1. 0/6 Detect non email patches in git-mailinfoEric W. Biederman, May 23, 2006
  2. 1/6 Make read_one_header_line return a flag not a length.Eric W. Biederman, May 23, 2006
  3. 2/6 Move B and Q decoding into check header.Eric W. Biederman, May 23, 2006
  4. 3/6 Refactor commit messge handling.Eric W. Biederman, May 23, 2006
  5. 4/6 In handle_body only read a line if we don't already have one.Eric W. Biederman, May 23, 2006
  6. 5/6 More accurately detect header lines in read_one_header_lineEric W. Biederman, May 23, 2006
  7. 6/6 Allow in body headers beyond the in body header prefix.Eric W. Biederman, May 23, 2006
  8. Junio C HamanoMay 26, 2006
  9. Junio C HamanoMay 23, 2006
  10. Eric W. BiedermanMay 26, 2006

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.