diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-06-13 22:19:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-13 22:19:43 +0200 |
commit | c51026115481834a1e0f49a2dafc1ce86025889c (patch) | |
tree | 90967e8a7b8d6c9172c425fbb6ee958af230d2fc /sequencer.c | |
parent | Merge branch 'ab/deprecate-R-for-dynpath' (diff) | |
parent | rebase -r: always reword merge -c (diff) | |
download | git-c51026115481834a1e0f49a2dafc1ce86025889c.tar.xz git-c51026115481834a1e0f49a2dafc1ce86025889c.zip |
Merge branch 'pw/rebase-edit-message-for-replayed-merge'
A "merge -c" instruction during "git rebase --rebase-merges" should
give the user a chance to edit the log message, even when there is
otherwise no need to create a new merge and replace the existing
one (i.e. fast-forward instead), but did not. Which has been
corrected.
* pw/rebase-edit-message-for-replayed-merge:
rebase -r: always reword merge -c
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c index 334de14542..ab74b6baf1 100644 --- a/sequencer.c +++ b/sequencer.c @@ -3401,6 +3401,10 @@ static int do_merge(struct repository *r, rollback_lock_file(&lock); ret = fast_forward_to(r, &commit->object.oid, &head_commit->object.oid, 0, opts); + if (flags & TODO_EDIT_MERGE_MSG) { + run_commit_flags |= AMEND_MSG; + goto fast_forward_edit; + } goto leave_merge; } @@ -3504,6 +3508,7 @@ static int do_merge(struct repository *r, * value (a negative one would indicate that the `merge` * command needs to be rescheduled). */ + fast_forward_edit: ret = !!run_git_commit(r, git_path_merge_msg(r), opts, run_commit_flags); |