Re: [PATCH] send-email: clarify missing subject error
Junio C Hamano <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Harald Nordgren <[email protected]> writes: >> An input file to the 'git send-email' program is often the output >> of 'git format-patch'. Such a file begins with a UNIX 'From ' >> line, followed by email headers such as 'From:', 'Date:', and >> 'Subject:'. The 'Subject:' line cannot be the first line of >> the file in this case, yet it is a valid input. >> >> The only condition that this subroutine flags as an error is when >> the file lacks a subject line. "No 'Subject:' line in '%s'\n" is a >> clear message to display and is an improvement over the original. >> >> However, the fact that the first line does not start with >> "Subject:" is irrelevant to the basis of the subroutine's >> decision to issue an error, I think. > > Yeah, that makes sense, so maybe we don't need to focus on it being > the first line, but Subject needs to be there somewhere before the > body. Yeah, the curious thing is that the subroutine with the loop is happy as long as it finds "^Subject: " somewhere, not necessarily before the first blank line. That is why I said "No 'Subject: ' line in '%s'\n" is clear enough and an improvement over the original. Anything else will add lie to it. Thanks.