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>

Johannes Schindelin committed Apr 27, 2018 at 22:48 UTC dc4b5bc3534bf4d8f362173d905d294048c48f79
1 file changed +2
sequencer.c
+2
@@ -716,6 +716,8 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
716 argv_array_pushf(&cmd.args, "-S%s", opts->gpg_sign);
717 if (defmsg)
718 argv_array_pushl(&cmd.args, "-F", defmsg, NULL);
719 + else if (!(flags & EDIT_MSG))
720 + argv_array_pushl(&cmd.args, "-C", "HEAD", NULL);
721 if ((flags & CLEANUP_MSG))
722 argv_array_push(&cmd.args, "--cleanup=strip");
723 if ((flags & EDIT_MSG))