X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-fmt-merge-msg.c;h=7077d524776e748e0add4ff85478cd62512add15;hb=464509f790f409d95e0820364ef7296d82942d8c;hp=ebb3f37cf158dc479f364111893279805fa9a230;hpb=cb99be7c7d2afc71106ffaf400c769c8e72f1bb2;p=git.git diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c index ebb3f37cf..7077d5247 100644 --- a/builtin-fmt-merge-msg.c +++ b/builtin-fmt-merge-msg.c @@ -201,6 +201,15 @@ static void shortlog(const char *name, unsigned char *sha1, continue; bol = strstr(commit->buffer, "\n\n"); + if (bol) { + unsigned char c; + do { + c = *++bol; + } while (isspace(c)); + if (!c) + bol = NULL; + } + if (!bol) { append_to_list(&subjects, xstrdup(sha1_to_hex( commit->object.sha1)), @@ -208,7 +217,6 @@ static void shortlog(const char *name, unsigned char *sha1, continue; } - bol += 2; eol = strchr(bol, '\n'); if (eol) { oneline = xmemdupz(bol, eol - bol);