diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-04-27 22:48:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-02 00:47:47 +0200 |
commit | dc4b5bc3534bf4d8f362173d905d294048c48f79 (patch) | |
tree | 3c14aca218525455bf72a68aa67add273f28c2a5 /sequencer.c | |
parent | rebase -i: Handle "combination of <n> commits" with GETTEXT_POISON (diff) | |
download | git-dc4b5bc3534bf4d8f362173d905d294048c48f79.tar.xz git-dc4b5bc3534bf4d8f362173d905d294048c48f79.zip |
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 '')
-rw-r--r-- | sequencer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c index 3ce45fce80..6b2f01f6d6 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)) |