git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Merge seems to get confused by (reverted) cherry-picks
@ 2008-09-03  7:20 Björn Steinbrink
  2008-09-03  7:25 ` Björn Steinbrink
  2008-09-03  7:50 ` Junio C Hamano
  0 siblings, 2 replies; 9+ messages in thread
From: Björn Steinbrink @ 2008-09-03  7:20 UTC (permalink / raw)
  To: Junio C Hamano, Linus Torvalds; +Cc: git

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-09-03 17:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03  7:20 Merge seems to get confused by (reverted) cherry-picks Björn Steinbrink
2008-09-03  7:25 ` Björn Steinbrink
2008-09-03  7:50 ` Junio C Hamano
2008-09-03  8:37   ` Björn Steinbrink
2008-09-03 15:26     ` Linus Torvalds
2008-09-03  9:19   ` Ittay Dror
2008-09-03 11:04     ` Andreas Ericsson
2008-09-03 11:16     ` Johan Herland
2008-09-03 17:10       ` Mike Hommey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).