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

Re: Heads up: major rebase -i -p rework coming up

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 27, 2009, 18:08 UTC
Message-ID
<alpine.DEB.1.00.0901271903210.3586@pacific.mpi-cbg.de>
In-Reply-To
<20090127092117.d13f24e7.stephen@exigencecorp.com>
Hi,
On Tue, 27 Jan 2009, Stephen Haberman wrote:
Show 6 quoted lines
> > I am very sorry if somebody actually scripted rebase -i -p (by setting 
> > GIT_EDITOR with a script), but I am very certain that this cleanup is 
> > absolutely necessary to make rebase -i -p useful.
> 
> I have scripted rebase-i-p, but with GIT_EDITOR=: [1]. I assume this
> will still work and just accept the default script?

Yes, this will still work. AFAICT this is actually how git --no-interactive -p is implemented...

> (Er, maybe I can just use rebase-p...I forget why [1] is using the
> GIT_EDITOR=: with -i.)
See above... :-)
Show 18 quoted lines
> My primary pain point with rebase-i-p has been rebasing a branch that
> has merged in another branch that has a lot of commits on it. E.g.:
> 
>     a -- b -- c  origin/feature
>       \
>        d -- e    feature
>            /
>       ... g      origin/master
> 
> Where e is merging in, say, a latest release that had a few hundred
> commits in the master branch. After resolving conflicts/etc. in e, I
> want to rebase d..e from a to be on c.
> 
> The two problems have been:
> 
> 1) `git pull` with rebase set uses rebase-i, with no -p, so all of the
>    commits from the latest release branch that got merged in with e are
>    flattened/duplicated.

Maybe teach git pull about --rebase=preserve[-merges] and branch.<name>.rebase=preserve[-merges]?

Show 6 quoted lines
> 2) With manual invocation of `rebase-i-p`, previously you'd get a
>    laundry list of commits from the e merge that are new to the feature
>    branch, but since g and its ancestors aren't changing, you don't need
>    to consider them in the script and so its (potentially a lot of)
>    noise. This is what the parent probing back port from git sequencer
>    addressed.
I always meant to handle that in the fast-forward handling of pick_one().
Show 5 quoted lines
> So, I don't mean to rehash old complaints, as I'd love to see the 
> rebase-i-p code cleaned up by someone who can really refactor it vs. my 
> hack patches. But I wanted to emphasize the motivation for my hacks over 
> their implementation so that hopefully you can still address these use 
> cases in the new version.

Well, let's see how things turn out once I use the patches for my own work...

Thanks, Dscho

Previous: Stephen HabermanNext: Nanako Shiraishi
Message 25 of 27 in “Heads up: major rebase -i -p rework coming up”
  1. Johannes SchindelinJan 24, 2009
  2. Junio C HamanoJan 24, 2009
  3. Johannes SchindelinJan 24, 2009
  4. Johannes SchindelinJan 24, 2009
  5. Junio C HamanoJan 24, 2009
  6. Johannes SchindelinJan 25, 2009
  7. Marc BranchaudJan 26, 2009
  8. Thomas RastJan 24, 2009
  9. Johannes SchindelinJan 25, 2009
  10. Johannes SchindelinJan 25, 2009
  11. Jakub NarebskiJan 25, 2009
  12. Johannes SchindelinJan 25, 2009
  13. Sverre RabbelierJan 25, 2009
  14. Johannes SchindelinJan 25, 2009
  15. Junio C HamanoJan 25, 2009
  16. Johannes SchindelinJan 25, 2009
  17. Jakub NarebskiJan 25, 2009
  18. Johannes SchindelinJan 25, 2009
  19. Nanako ShiraishiFeb 3, 2009
  20. Johannes SchindelinFeb 3, 2009
  21. Jakub NarebskiJan 25, 2009
  22. Björn SteinbrinkJan 25, 2009
  23. Marc BranchaudJan 26, 2009
  24. Stephen HabermanJan 27, 2009
  25. Johannes SchindelinJan 27, 2009
  26. Nanako ShiraishiJan 27, 2009
  27. Stephen HabermanJan 27, 2009

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.