We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e25cfae + 7ed0988 commit 49e6be5Copy full SHA for 49e6be5
pretty.c
@@ -412,7 +412,7 @@ static void parse_commit_header(struct format_commit_context *context)
412
if (i == eol) {
413
state++;
414
/* strip empty lines */
415
- while (msg[eol + 1] == '\n')
+ while (msg[eol] == '\n' && msg[eol + 1] == '\n')
416
eol++;
417
} else if (!prefixcmp(msg + i, "author ")) {
418
context->author.off = i + 7;
@@ -425,6 +425,8 @@ static void parse_commit_header(struct format_commit_context *context)
425
context->encoding.len = eol - i - 9;
426
}
427
i = eol;
428
+ if (!msg[i])
429
+ break;
430
431
context->body_off = i;
432
context->commit_header_parsed = 1;
0 commit comments