diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-09-24 17:30:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-24 17:30:52 (GMT) |
commit | 4af130af0cfcb88c82eb223d964d4aa94d1d55d5 (patch) | |
tree | 6c0ca343552da6499b8058e27051742733239bc7 /sequencer.c | |
parent | 0f7ac90dbe7ecf511883b7aae84acbb698418f60 (diff) | |
parent | a3ec9eaf3877fbe1048f5bda37063d6d4eaf1c54 (diff) | |
download | git-4af130af0cfcb88c82eb223d964d4aa94d1d55d5.zip git-4af130af0cfcb88c82eb223d964d4aa94d1d55d5.tar.gz git-4af130af0cfcb88c82eb223d964d4aa94d1d55d5.tar.bz2 |
Merge branch 'en/sequencer-empty-edit-result-aborts'
"git rebase" etc. in Git 2.19 fails to abort when given an empty
commit log message as result of editing, which has been corrected.
* en/sequencer-empty-edit-result-aborts:
sequencer: fix --allow-empty-message behavior, make it smarter
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index 0b14e20..ddb41a6 100644 --- a/sequencer.c +++ b/sequencer.c @@ -903,7 +903,7 @@ static int run_git_commit(const char *defmsg, struct replay_opts *opts, if ((flags & ALLOW_EMPTY)) argv_array_push(&cmd.args, "--allow-empty"); - if (opts->allow_empty_message) + if (!(flags & EDIT_MSG)) argv_array_push(&cmd.args, "--allow-empty-message"); if (cmd.err == -1) { @@ -1317,7 +1317,7 @@ static int try_to_commit(struct strbuf *msg, const char *author, if (cleanup != COMMIT_MSG_CLEANUP_NONE) strbuf_stripspace(msg, cleanup == COMMIT_MSG_CLEANUP_ALL); - if (!opts->allow_empty_message && message_is_empty(msg, cleanup)) { + if ((flags & EDIT_MSG) && message_is_empty(msg, cleanup)) { res = 1; /* run 'git commit' to display error message */ goto out; } |