summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-04-27 20:48:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-01 22:47:47 (GMT)
commitdc4b5bc3534bf4d8f362173d905d294048c48f79 (patch)
tree3c14aca218525455bf72a68aa67add273f28c2a5 /sequencer.c
parente12a7ef5972423c822834f9c514a54e32ea99e65 (diff)
downloadgit-dc4b5bc3534bf4d8f362173d905d294048c48f79.zip
git-dc4b5bc3534bf4d8f362173d905d294048c48f79.tar.gz
git-dc4b5bc3534bf4d8f362173d905d294048c48f79.tar.bz2
sequencer: always commit without editing when asked for
Previously, we only called run_git_commit() without EDIT_MSG when we also passed in a default message. However, an upcoming caller will want to commit without EDIT_MSG and *without* a default message: to clean up fixup/squash comments in HEAD's commit message. Let's prepare for that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 3ce45fc..6b2f01f 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -716,6 +716,8 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
argv_array_pushf(&cmd.args, "-S%s", opts->gpg_sign);
if (defmsg)
argv_array_pushl(&cmd.args, "-F", defmsg, NULL);
+ else if (!(flags & EDIT_MSG))
+ argv_array_pushl(&cmd.args, "-C", "HEAD", NULL);
if ((flags & CLEANUP_MSG))
argv_array_push(&cmd.args, "--cleanup=strip");
if ((flags & EDIT_MSG))