Merge branch 'pw/rebase-edit-message-for-replayed-merge'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2019 20:19:43 +0000 (13:19 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2019 20:19:43 +0000 (13:19 -0700)
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

1  2 
sequencer.c
diff --combined sequencer.c
index 334de145421c1fe1b23dd4713f1f2acedd2f78d8,9acf45863596f3a6ef654f49632052a0e1101fa7..ab74b6baf1185936fba414f7fb1303ba82d76284
@@@ -767,7 -767,7 +767,7 @@@ static int parse_key_value_squoted(cha
   *    GIT_AUTHOR_DATE='$author_date'
   *
   * where $author_name, $author_email and $author_date are quoted. We are strict
 - * with our parsing, as the file was meant to be eval'd in the old
 + * with our parsing, as the file was meant to be eval'd in the now-removed
   * git-am.sh/git-rebase--interactive.sh scripts, and thus if the file differs
   * from what this function expects, it is better to bail out than to do
   * something that the user does not expect.
@@@ -3401,6 -3401,10 +3401,10 @@@ static int do_merge(struct repository *
                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;
        }
  
                 * 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);