[BUG] rebase -p loses commits

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[BUG] rebase -p loses commits

From: Jeff King <hidden>
Date: 2016-06-15 22:51:15

I was trying to reproduce somebody's issue with a minimal test case, and
I ran across this setup wherein "rebase -p" silently drops some commits:

  commit() {
    echo $1 >file && git add file && git commit -m $1
  }

  # repo with two branches, each with conflicting content
  git init repo && cd repo &&
  commit base &&
  commit master &&
  git checkout -b feature HEAD^ &&
  commit feature &&

  # now merge them, with some fake resolution
  ! git merge master &&
  commit resolved &&

  # now try to "rebase -p" on top of master.
  git rebase -p master

The rebase completes successfully, but the "feature" commit and the
merge resolution are gone!

I'm totally unfamiliar with the preserve-merges code, and I won't have
time to dig further until later today or tomorrow, so I thought I'd
throw it out here and see if anybody has any clues.

-Peff

Re: [BUG] rebase -p loses commits

From: Andrew Wong <hidden>
Date: 2016-06-15 22:51:15

On 05/16/2011 06:33 AM, Jeff King wrote:
I was trying to reproduce somebody's issue with a minimal test case, and
I ran across this setup wherein "rebase -p" silently drops some commits:
  
This particular patch seems to have something to do with the bug:
    d80d6bc146232d81f1bb4bc58e5d89263fd228d4
    http://thread.gmane.org/gmane.comp.version-control.git/98247/focus=98251

However, I can't figure out what the "odd boundary case" that this patch
was supposed to fix is. Anyone have any idea?

Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help