Merge seems to get confused by (reverted) cherry-picks
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- Sep 3, 2008, 07:20 UTC
- Message-ID
- <20080903072011.GA14252@atjola.homenet>
Hi,
"git merge" produces a (IMHO) wrong result, when a commit from the branch that is to be merged in was cherry-picked into the current branch and later reverted on the original branch. Basically ignoring the revert.
Example: mkdir gmt cd gmt git init
/bin/echo -e "1\n2\n3\n4\n5\n6\n" > file git add file git commit -m init
/bin/echo -e "1\n2\n3\na\n4\n5\n6\n" > file git add file git commit -m add
git revert --no-edit HEAD
git checkout -b test HEAD~2 sleep 1 # Avoid race git cherry-pick master^ git merge master
That last "git merge" call happily tells: Already uptodate! Merge made by recursive.
And "file" still contains the "a" that was added in the second commit.
Seems broken to me, of course I want that revert to "show up" in the merge result, probably as a conflict for me to resolve.
Björn