diff options
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/commit.c | 2 | ||||
| -rw-r--r-- | builtin/reset.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 3f189428b1..1f6dbcd0d0 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) { diff --git a/builtin/reset.c b/builtin/reset.c index acd6278868..5c6206bc1c 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -103,7 +103,7 @@ static void print_new_head_line(struct commit *commit) if (body) { const char *eol; size_t len; - body += 2; + body = skip_blank_lines(body + 2); eol = strchr(body, '\n'); len = eol ? eol - body : strlen(body); printf(" %.*s\n", (int) len, body); |
