aboutsummaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-11 10:31:07 -0700
committerJunio C Hamano <gitster@pobox.com>2016-07-11 10:31:08 -0700
commit62e5e83f8dfc98e182a1ca3a48b2c69f4fd417ce (patch)
treef25182845eb0c18d21f5454f34cfe0d0c1c540f4 /builtin/commit.c
parent493ddea54d32cea8e99029a21d16cfdd164d31fd (diff)
parent054a5aee6f3e8e90d96f7b3f76f5f55752561c59 (diff)
downloadgit-62e5e83f8dfc98e182a1ca3a48b2c69f4fd417ce.tar.gz
git-62e5e83f8dfc98e182a1ca3a48b2c69f4fd417ce.tar.xz
Merge branch 'js/find-commit-subject-ignore-leading-blanks'
A helper function that takes the contents of a commit object and finds its subject line did not ignore leading blank lines, as is commonly done by other codepaths. Make it ignore leading blank lines to match. * js/find-commit-subject-ignore-leading-blanks: reset --hard: skip blank lines when reporting the commit subject sequencer: use skip_blank_lines() to find the commit subject commit -C: skip blank lines at the beginning of the message commit.c: make find_commit_subject() more robust pretty: make the skip_blank_lines() function public
Diffstat (limited to 'builtin/commit.c')
-rw-r--r--builtin/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index 3f189428b..1f6dbcd0d 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -715,7 +715,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
char *buffer;
buffer = strstr(use_message_buffer, "\n\n");
if (buffer)
- strbuf_addstr(&sb, buffer + 2);
+ strbuf_addstr(&sb, skip_blank_lines(buffer + 2));
hook_arg1 = "commit";
hook_arg2 = use_message;
} else if (fixup_message) {