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

Re: Possible regression in git-rev-list --header

From
Andreas Ericsson <ae@op5.se>
Date
Jan 4, 2007, 15:18 UTC
Message-ID
<459D1ABF.8010500@op5.se>
In-Reply-To
<e5bfff550701030235g6f26044h8dd73e8abe1ec9e3@mail.gmail.com>
Marco Costalba wrote:
Show 13 quoted lines
> On 1/3/07, Lars Hjemli <hjemli@gmail.com> wrote:
>> On 1/3/07, Marco Costalba <mcostalba@gmail.com> wrote:
>> >         - one blank line
>> >         - zero or one line with log title
>> >         - zero or more lines with log message
>> >         - a terminating '\0'
>>
>> I think the should be:
>>   -zero or more blank lines
> 
> Isn't it zero or _one_ blank line? Why more then one? would be it
> useful? surely is slower to parse.
> 

I've imported a repository from CVS to git (the nagiosplugin repo), where one author consistently put an empty line before the "commit subject". I'm fairly certain this is done by the tool he uses (some GUI thing, no doubt).

I'm currently looking into stripping optional empty lines appearing postheaders-prebody from rev-list output, as it completely fudges qgit and gitk viewing alike. Good thing the author in question only does translations and no code work, or I'd be screaming with frustration trying to figure out which commit does what. Mind you, CVS's lack of forensic tools doesn't exactly inspire the clear and concise commit messages we see in git, but still...

>>   -zero or more non-blank lines with log title
> 
> multi lines titles are allowed? never saw one of them.
> 

They aren't disallowed. The log message part only by convention consists of a title line followed by a blank and then the message body. It's entirely possible to just start writing the message straight off, or put any number of blank lines wherever.

Show 8 quoted lines
>>   -zero or more blank lines
> 
> Why? this is necessary only to disambiguate muti (non blank) lines
> titles, but as Junio pointed out distinction between log title and log
> message is only in the Porcelain, not encoded in git. So the Porcalain
> is going to show _one_line title if any an the remaining stuff in the
> log message.
> 

Sensible. There's no (reliable) way of knowing if the first line with text on is actually a title or just the start of a 25-line sentence, or even the signoff line, or completely empty.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Andreas EricssonNext: Lars Hjemli
Message 22 of 26 in “Possible regression in git-rev-list --header”
  1. Marco CostalbaDec 30, 2006
  2. Jakub NarebskiDec 30, 2006
  3. Johannes SchindelinDec 30, 2006
  4. Junio C HamanoDec 30, 2006
  5. Junio C HamanoDec 30, 2006
  6. Johannes SchindelinDec 31, 2006
  7. Junio C HamanoDec 31, 2006
  8. Marco CostalbaDec 31, 2006
  9. Johannes SchindelinDec 31, 2006
  10. Marco CostalbaDec 31, 2006
  11. Junio C HamanoJan 1, 2007
  12. Johannes SchindelinJan 2, 2007
  13. Junio C HamanoJan 2, 2007
  14. Johannes SchindelinJan 2, 2007
  15. Marco CostalbaJan 2, 2007
  16. Marco CostalbaJan 3, 2007
  17. Junio C HamanoJan 3, 2007
  18. Lars HjemliJan 3, 2007
  19. Marco CostalbaJan 3, 2007
  20. Lars HjemliJan 3, 2007
  21. Andreas EricssonJan 4, 2007
  22. Andreas EricssonJan 4, 2007
  23. Lars HjemliJan 3, 2007
  24. Johannes SchindelinDec 31, 2006
  25. Move commit reencoding parameter parsing to revision.cJunio C Hamano, Dec 30, 2006
  26. Johannes SchindelinDec 31, 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.