Skip to content

Commit dc4b5bc

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e12a7ef commit dc4b5bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sequencer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,8 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts,
716716
argv_array_pushf(&cmd.args, "-S%s", opts->gpg_sign);
717717
if (defmsg)
718718
argv_array_pushl(&cmd.args, "-F", defmsg, NULL);
719+
else if (!(flags & EDIT_MSG))
720+
argv_array_pushl(&cmd.args, "-C", "HEAD", NULL);
719721
if ((flags & CLEANUP_MSG))
720722
argv_array_push(&cmd.args, "--cleanup=strip");
721723
if ((flags & EDIT_MSG))

0 commit comments

Comments
 (0)