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

Re: Commit dropped when swapping commits with rebase -i -p

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Aug 30, 2017, 18:59 UTC
Message-ID
<CAHGBnuMC_10krsdZe2KiQ4jjiL43kogn--dWjPgca_p2xgmQMA@mail.gmail.com>
In-Reply-To
<CAN0heSqGfxrFTwuaxgppZTx+3U=g_Qs4PyaCBF6ddV_PbvdpTQ@mail.gmail.com>
On Wed, Aug 30, 2017 at 8:07 PM, Martin Ågren <martin.agren@gmail.com> wrote:
> The man-page for git rebase says that combining -p with -i is "generally
> not a good idea unless you know what you are doing (see BUGS below)".

Thanks for pointing this out again. I remember to have read this some time ago, but as I general consider myself to know what I'm doing, I forgot about it :-)

Anyway, this should really more explicitly say *what* you need to know about, that is, reordering commits does not work.

> So if you agree that a "dropped commit" is a "counterintuitive result",
> this is known and documented. Maybe the warning could be harsher, but it
> does say "unless you know what you are doing".

I'd say it's worse than counterintuitive, as counterintuitive might still be correct, while in my case it clearly is not. So yes, the warning must be harsher in my opinion. Maybe we should even abort rebase -i-p if reordering of commits is detected.

-- 
Sebastian Schuberth
Previous: Martin ÅgrenNext: Jonathan Nieder
Message 3 of 12 in “Commit dropped when swapping commits with rebase -i -p”
  1. Sebastian SchuberthAug 30, 2017
  2. Martin ÅgrenAug 30, 2017
  3. Sebastian SchuberthAug 30, 2017
  4. Jonathan NiederSep 2, 2017
  5. Sebastian SchuberthSep 11, 2017
  6. Junio C HamanoSep 15, 2017
  7. Andreas HeidukSep 16, 2017
  8. Sebastian SchuberthSep 16, 2017
  9. Phillip WoodSep 17, 2017
  10. Johannes SchindelinAug 30, 2017
  11. Sebastian SchuberthAug 30, 2017
  12. Johannes SchindelinSep 1, 2017

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.