X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=commit.c;h=2a58175aca16dc211cdf5a380e82bc9c0f4d1326;hb=fffe694d607ea683b5d08ee99a46d9b06cb74006;hp=544e42629e3213a9927134273899d48c6cbe3161;hpb=9066f4ef2fe27b7636094c06d2361820cd31e03e;p=git.git diff --git a/commit.c b/commit.c index 544e42629..2a58175ac 100644 --- a/commit.c +++ b/commit.c @@ -703,7 +703,7 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const char *after_subject, int relative_date) { - int hdr = 1, body = 0; + int hdr = 1, body = 0, seen_title = 0; unsigned long offset = 0; int indent = 4; int parents_shown = 0; @@ -809,6 +809,8 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, body = 1; if (is_empty_line(line, &linelen)) { + if (!seen_title) + continue; if (!body) continue; if (subject) @@ -817,6 +819,7 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, break; } + seen_title = 1; if (subject) { int slen = strlen(subject); memcpy(buf + offset, subject, slen);