aboutsummaryrefslogtreecommitdiff
path: root/builtin-fmt-merge-msg.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-04-16 00:37:33 -0700
committerJunio C Hamano <gitster@pobox.com>2008-04-16 00:37:33 -0700
commit464509f790f409d95e0820364ef7296d82942d8c (patch)
tree5825102bb17963d3890c487d88f6d69703620947 /builtin-fmt-merge-msg.c
parent2b6f0b0a78a713be51149f27c2c1172fe4afc9cd (diff)
parentd3e54c88291c2d880ff3a72167c5d3159aed8e97 (diff)
downloadgit-464509f790f409d95e0820364ef7296d82942d8c.tar.gz
git-464509f790f409d95e0820364ef7296d82942d8c.tar.xz
Merge branch 'maint-1.5.4' into maint
* maint-1.5.4: git-bisect: make "start", "good" and "skip" succeed or fail atomically git-am: cope better with an empty Subject: line Ignore leading empty lines while summarizing merges bisect: squelch "fatal: ref HEAD not a symref" misleading message builtin-apply: Show a more descriptive error on failure when opening a patch Clarify documentation of git-cvsserver, particularly in relation to git-shell
Diffstat (limited to 'builtin-fmt-merge-msg.c')
-rw-r--r--builtin-fmt-merge-msg.c10
1 files changed, 9 insertions, 1 deletions
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);