Re: Serious bug with pretty format strings & empty bodies?
From: Jonathan del Strother <hidden>
Date: 2016-06-15 22:44:00
On Dec 19, 2007 11:23 PM, René Scharfe [off-list ref] wrote:
quoted hunk ↗ jump to hunk
Jonathan del Strother schrieb:quoted
On Dec 19, 2007 6:44 PM, Alex Riesen [off-list ref] wrote:quoted
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.