git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 0/3] rebase --continue: remove .git/MERGE_MSG

From
Elijah Newren <newren@gmail.com>
Date
Aug 13, 2021, 00:46 UTC
Message-ID
<CABPp-BGHmCCeY7j9hVDGZPuLU8gR-ka3iEzUjK0wvkSUSYdNxA@mail.gmail.com>
In-Reply-To
<pull.1013.v2.git.1628775729.gitgitgadget@gmail.com>

On Thu, Aug 12, 2021 at 6:46 AM Phillip Wood via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 110 quoted lines
>
> Thanks for the comments on V1. I have expanded the commit message for the
> first patch to give a bit more context and reworded a couple of test
> descriptions in patch 2 as suggested by Elijah. Patch 3 is unchanged.
>
> V1 Cover Letter:
>
> If the user removes all the changes from the worktree without running git
> reset then rebase --continue leaves behind .git/MERGE_MSG which will then
> seed the message of the next commit. While working on this I noticed a
> couple of fixups for the test files I was adding to, I've cc'd Elijah in
> case my reasoning for patch 2 is off. Thanks to Victor for the bug report.
>
> cc: Victor Gambier vgambier@excilys.com cc: Elijah Newren newren@gmail.com
> cc: Johannes Schindelin Johannes.Schindelin@gmx.de
>
> Phillip Wood (3):
>   t3403: fix commit authorship
>   rebase --apply: restore some tests
>   rebase --continue: remove .git/MERGE_MSG
>
>  sequencer.c                |  3 +++
>  t/t3403-rebase-skip.sh     | 13 +++++++++++--
>  t/t3418-rebase-continue.sh | 18 ++++++++++++++----
>  3 files changed, 28 insertions(+), 6 deletions(-)
>
>
> base-commit: 2d755dfac9aadab25c3e025b849252b8c0a61465
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1013%2Fphillipwood%2Fwip%2Frebase-remove-merge-msg-v2
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1013/phillipwood/wip/rebase-remove-merge-msg-v2
> Pull-Request: https://github.com/gitgitgadget/git/pull/1013
>
> Range-diff vs v1:
>
>  1:  7559781ca92 ! 1:  8755dfa9d04 t3403: fix commit authorship
>      @@ Commit message
>           t3403: fix commit authorship
>
>           Setting GIT_AUTHOR_* when committing with --amend will only change the
>      -    author if we also pass --reset-author
>      +    author if we also pass --reset-author.  This commit is used in some
>      +    tests that ensure the author ident does not change when rebasing.
>      +    Creating this commit without changing the authorship meant that the
>      +    test would not catch regressions that caused rebase to discard the
>      +    original authorship information.
>
>           Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>
>  2:  f7722dab21d ! 2:  84fe5823b4f rebase --apply: restore some tests
>      @@ Commit message
>           from "am" to "merge"", 2020-02-15). However some tests seem to have
>           been missed leading to us testing the "merge" backend twice. This
>           patch fixes some cases that I noticed while adding tests to these
>      -    files, I have not audited all the other rebase test files.
>      +    files, I have not audited all the other rebase test files. I've
>      +    reworded a couple of the test descriptions to make it clear which
>      +    backend they are testing.
>
>           Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>
>      @@ t/t3403-rebase-skip.sh: test_expect_success setup '
>        test_expect_success 'rebase --skip can not be used with other options' '
>
>        ## t/t3418-rebase-continue.sh ##
>      -@@ t/t3418-rebase-continue.sh: test_expect_success 'non-interactive rebase --continue works with touched file'
>      +@@ t/t3418-rebase-continue.sh: test_expect_success 'setup' '
>      +  git checkout main
>      + '
>      +
>      +-test_expect_success 'interactive rebase --continue works with touched file' '
>      ++test_expect_success 'merge based rebase --continue with works with touched file' '
>      +  rm -fr .git/rebase-* &&
>      +  git reset --hard &&
>      +  git checkout main &&
>      +@@ t/t3418-rebase-continue.sh: test_expect_success 'interactive rebase --continue works with touched file' '
>      +  git rebase --continue
>      + '
>      +
>      +-test_expect_success 'non-interactive rebase --continue works with touched file' '
>      ++test_expect_success 'apply based rebase --continue works with touched file' '
>      +  rm -fr .git/rebase-* &&
>         git reset --hard &&
>         git checkout main &&
>
>  3:  6a63b657f13 ! 3:  028c9dfc460 rebase --continue: remove .git/MERGE_MSG
>      @@ t/t3403-rebase-skip.sh: test_expect_success 'moved back to branch correctly' '
>         test_must_fail git rebase -i --onto goodbye \
>
>        ## t/t3418-rebase-continue.sh ##
>      -@@ t/t3418-rebase-continue.sh: test_expect_success 'interactive rebase --continue works with touched file' '
>      +@@ t/t3418-rebase-continue.sh: test_expect_success 'merge based rebase --continue with works with touched file'
>         git rebase --continue
>        '
>
>      -+test_expect_success 'rebase --continue removes .git/MERGE_MSG' '
>      ++test_expect_success 'merge based rebase --continue removes .git/MERGE_MSG' '
>       + git checkout -f --detach topic &&
>       +
>       + test_must_fail git rebase --onto main HEAD^ &&
>      @@ t/t3418-rebase-continue.sh: test_expect_success 'interactive rebase --continue w
>       + test_path_is_missing .git/MERGE_MSG
>       +'
>       +
>      - test_expect_success 'non-interactive rebase --continue works with touched file' '
>      + test_expect_success 'apply based rebase --continue works with touched file' '
>         rm -fr .git/rebase-* &&
>         git reset --hard &&
>
> --
> gitgitgadget
Thanks, this version looks good to me.
Previous: Phillip WoodNext: Junio C Hamano
Message 22 of 25 in “rebase --continue: remove .git/MERGE_MSG”
  1. 0/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 10, 2021
  2. 1/3 t3403: fix commit authorshipPhillip Wood via GitGitGadget, Aug 10, 2021
  3. Elijah NewrenAug 10, 2021
  4. Junio C HamanoAug 10, 2021
  5. Phillip WoodAug 12, 2021
  6. Johannes SchindelinAug 14, 2021
  7. Junio C HamanoAug 15, 2021
  8. Phillip WoodAug 15, 2021
  9. Junio C HamanoAug 16, 2021
  10. Phillip WoodAug 17, 2021
  11. 2/3 rebase --apply: restore some testsPhillip Wood via GitGitGadget, Aug 10, 2021
  12. Elijah NewrenAug 10, 2021
  13. Phillip WoodAug 12, 2021
  14. 3/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 10, 2021
  15. Elijah NewrenAug 10, 2021
  16. 0/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 12, 2021
  17. 1/3 t3403: fix commit authorshipPhillip Wood via GitGitGadget, Aug 12, 2021
  18. 2/3 rebase --apply: restore some testsPhillip Wood via GitGitGadget, Aug 12, 2021
  19. 3/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 12, 2021
  20. Junio C HamanoAug 13, 2021
  21. Phillip WoodAug 14, 2021
  22. Elijah NewrenAug 13, 2021
  23. Junio C HamanoAug 13, 2021
  24. Elijah NewrenAug 13, 2021
  25. Phillip WoodAug 14, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.