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

Re: [PATCH] Fix rebase -p --onto

From
Greg Price <price@ksplice.com>
Date
Jul 17, 2009, 19:00 UTC
Message-ID
<20090717190043.GM7878@vinegar-pot.mit.edu>
In-Reply-To
<alpine.DEB.1.00.0907172029230.4495@intel-tinevez-2-302>
On Fri, Jul 17, 2009 at 08:32:20PM +0200, Johannes Schindelin wrote:
Show 5 quoted lines
> > I don't believe rebase -i -p has ever worked with reordering commits.
> 
> It was not meant to.  Actually, it was never meant as "rebase -i -p", but 
> always as "rebase -p" (which, for technical reasons, would be implemented 
> in git-rebase--interactive.sh).

Understood. The -p functionality is invaluable already without -i, and reordering commits with -p raises substantial new questions about what the behavior should be.

I wonder if it might be worth giving an error message when the user attempts to reorder commits under -p? The current behavior is surprising (reordering A after B, C, D causes B, C, D to be dropped) even when no merges are involved. I wouldn't want to give an error on just the combination of options -i -p, though, since "edit" is useful.

> Having said that, I am working on a rebase-i-p series which _does_ allow 
> reordering commits, putting commits on newly-created topic branches, 
> redoing merges explicitely.

That would be excellent. I'm using git-sequencer from Stephan Beyer's seq-builtin-dev branch for some work because I need this kind of functionality. It would be great to see it in mainline in one form or another. I don't doubt that it will require a good deal of work.

Thanks! Greg

Previous: Johannes SchindelinNext: Greg Price
Message 8 of 9 in “Fix rebase -p --onto”
  1. Fix rebase -p --ontoGreg Price, Jul 16, 2009
  2. Johannes SixtJul 17, 2009
  3. Junio C HamanoJul 17, 2009
  4. Johannes SixtJul 17, 2009
  5. Johannes SixtJul 17, 2009
  6. Greg PriceJul 17, 2009
  7. Johannes SchindelinJul 17, 2009
  8. Greg PriceJul 17, 2009
  9. Greg PriceJul 17, 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.