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>
This commit is contained in:
parent
e12a7ef597
commit
dc4b5bc353
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user