[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