Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2019-05-02 13:22:49 +0300
committerJunio C Hamano <gitster@pobox.com>2019-05-19 04:33:43 +0300
commit6df8df083109b1aa37824fc1ebe2347f887afe34 (patch)
treea42a7136f874e9edebf44fc684a4501a5aaf913a /sequencer.c
parentab15ad1a3b4b04a29415aef8c9afa2f64fc194a2 (diff)
rebase -r: always reword merge -c
If a merge can be fast-forwarded then make sure that we still edit the commit message if the user specifies -c. The implementation follows the same pattern that is used for ordinary rewords that are fast-forwarded. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index f88a97fb10..9acf458635 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);