Subject: [PATCH v2 0/4] rebase -r: some merge related fixes

From: "Phillip Wood via GitGitGadget" <[email-masked]>
Date: Fri, 20 Aug 2021 15:40:34 +0000

Thanks for the feedback on V1. I have added a sentence to the commit message
of the third patch to make it clear that the fast-forward code is just
moved, not changed

Cover letter from V1: This is a collection of merge related fixes for rebase
-r

 * Make merge -c behave like reword.
 * When fast-forwarding a merge don't leave .git/MERGE_MSG around (reported
   by Gábor)
 * Make merge -c work when with --strategy

Phillip Wood (4):
  rebase -r: make 'merge -c' behave like reword
  rebase -i: Add another reword test
  rebase -r: don't write .git/MERGE_MSG when fast-forwarding
  rebase -r: fix merge -c with a merge strategy

 sequencer.c                   | 106 ++++++++++++++++++----------------
 t/lib-rebase.sh               |  56 ++++++++++++++++++
 t/t3404-rebase-interactive.sh |  13 +++++
 t/t3430-rebase-merges.sh      |  38 +++++++++---
 4 files changed, 155 insertions(+), 58 deletions(-)

base-commit: 66262451ec94d30ac4b80eb3123549cf7a788afd
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1015%2Fphillipwood%2Fwip%2Fsequencer-merge-c-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1015/phillipwood/wip/sequencer-merge-c-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1015

Range-diff vs v1:

 1:  b514dbdf928 = 1:  b514dbdf928 rebase -r: make 'merge -c' behave like reword
 2:  511cf9204ad = 2:  511cf9204ad rebase -i: Add another reword test
 3:  01d5ed4cba0 ! 3:  080e580e11c rebase -r: don't write .git/MERGE_MSG when fast-forwarding
     @@ Commit message
          is not removed and can end up seeding the message of a commit made
          after the rebase has finished. Avoid writing .git/MERGE_MSG when we
          are fast-forwarding by writing the file after the fast-forward
     -    checks.
     +    checks. Note that there are no changes to the fast-forward code, it is
     +    simply moved.
      
          Note that the way this change is implemented means we no longer write
          the author script when fast-forwarding either. I believe this is safe
 4:  f2a2e3531a1 = 4:  b6981ea5439 rebase -r: fix merge -c with a merge strategy

-- 
gitgitgadget