From: Jonathan del Strother Date: Thu, 20 Dec 2007 10:44:12 GMT Subject: Re: Serious bug with pretty format strings & empty bodies? Message-ID: <57518fd10712200244o656c7f44j426cc71c89515de3@mail.gmail.com> In-Reply-To: <4769A7FB.1070904@lsrfire.ath.cx> On Dec 19, 2007 11:23 PM, René Scharfe wrote: > Jonathan del Strother schrieb: > > On Dec 19, 2007 6:44 PM, Alex Riesen wrote: > >> Could you try > >> > >> git cat-file 18d2480ab689b483ef1ebbdb3f7420904049ba0b > >> > >> (or any other problematic commit) and post its output here? > > > > You mean git cat-file commit ... ? > > I get the normal output, but the problematic commits don't show a > > newline character at the end of the cat-file output. > > Just a shot in the dark: does this patch on top of master make a difference? > > diff --git a/pretty.c b/pretty.c > index 9db75b4..5f95a59 100644 > --- a/pretty.c > +++ b/pretty.c > @@ -412,7 +412,7 @@ static void parse_commit_header(struct format_commit_context *context) > if (i == eol) { > state++; > /* strip empty lines */ > - while (msg[eol + 1] == '\n') > + while (msg[eol] == '\n' && msg[eol + 1] == '\n') > eol++; > } else if (!prefixcmp(msg + i, "author ")) { > context->author.off = i + 7; > No luck with that, I'm afraid.