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

Re: [PATCH 4/5] rebase -i: don't fork git checkout

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Sep 8, 2021, 18:14 UTC
Message-ID
<f05dc55f-a7e4-b8f7-7b0c-5000bf48f803@gmail.com>
In-Reply-To
<39ad40c9297531a2d42b7263a1d41b1ecbc23c0a.1631108472.git.gitgitgadget@gmail.com>
Hi Phillip,
Le 2021-09-08 à 09:41, Phillip Wood via GitGitGadget a écrit :
Show 10 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk>
> 
> The "apply" based rebase has avoided forking git checkout since
> ac7f467fef ("builtin/rebase: support running "git rebase <upstream>"",
> 2018-08-07). The code that handles the checkout was moved into libgit
> by b309a97108 ("reset: extract reset_head() from rebase", 2020-04-07)
> so lets start using it for the "merge" based rebase as well. This
> opens the way for us to stop calling the post-checkout hook in the
> future.
> 

While in general I think it's a good thing to avoid forking, this change might result in behavioral differences. Any config that affects 'git checkout' but not the internal 'reset.c::reset_head' function might play a role in the rebase UX.

One that immediately came to mind is 'submodule.recurse'. This initial 'onto' checkout was pretty much the only part of 'git rebase' that did something useful for submodules, so it's kind of sad to see it regress. [That is, until someone takes the time to implement 'git rebase --recurse-submodules' and makes sure *all* code paths that touch the working tree pay attention to this flag, and that will probably necessitate 'git merge --recurse-submodules' first because of the 'merge' backend... as far as I'm aware it's on Emily's list [1], it's also on mine but I don't know when I'll get the time.]

Anyway, I'm not saying that we should not do what this patch is proposing, but I think caveats such as that should be documented in the commit message, and maybe an audit of other configs that might results in behavioural differences should be done.

Thanks,
Philippe.
[1] https://lore.kernel.org/git/YHofmWcIAidkvJiD@google.com/t/#m0229af9183a84c2367f21e82adfbd21f08aa4437
Previous: Phillip Wood via GitGitGadgetNext: Phillip Wood
Message 10 of 31 in “rebase -i: a couple of small improvements”
  1. 0/5 rebase -i: a couple of small improvementsPhillip Wood via GitGitGadget, Sep 8, 2021
  2. 1/5 sequencer.c: factor out a functionPhillip Wood via GitGitGadget, Sep 8, 2021
  3. Eric SunshineSep 8, 2021
  4. Phillip WoodSep 9, 2021
  5. Johannes SchindelinSep 9, 2021
  6. 2/5 rebase: fix todo-list rereadingPhillip Wood via GitGitGadget, Sep 8, 2021
  7. Johannes SchindelinSep 9, 2021
  8. 3/5 reset_head(): mark oid parameter as constPhillip Wood via GitGitGadget, Sep 8, 2021
  9. 4/5 rebase -i: don't fork git checkoutPhillip Wood via GitGitGadget, Sep 8, 2021
  10. Philippe BlainSep 8, 2021
  11. Phillip WoodSep 9, 2021
  12. Philippe BlainSep 9, 2021
  13. Phillip WoodSep 9, 2021
  14. Elijah NewrenSep 9, 2021
  15. Philippe BlainSep 10, 2021
  16. Phillip WoodSep 15, 2021
  17. Johannes SchindelinSep 9, 2021
  18. Philippe BlainSep 9, 2021
  19. Johannes SchindelinSep 9, 2021
  20. Johannes SchindelinSep 10, 2021
  21. Philippe BlainSep 10, 2021
  22. Elijah NewrenSep 9, 2021
  23. 5/5 rebase: remove unused parameterPhillip Wood via GitGitGadget, Sep 8, 2021
  24. Johannes SchindelinSep 9, 2021
  25. Phillip WoodSep 9, 2021
  26. 0/2 rebase -i: a couple of small improvementsPhillip Wood via GitGitGadget, Sep 23, 2021
  27. 2/2 rebase: fix todo-list rereadingPhillip Wood via GitGitGadget, Sep 23, 2021
  28. Junio C HamanoSep 24, 2021
  29. Phillip WoodSep 28, 2021
  30. 1/2 sequencer.c: factor out a functionPhillip Wood via GitGitGadget, Sep 23, 2021
  31. Junio C HamanoSep 24, 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.