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

Re: Merge seems to get confused by (reverted) cherry-picks

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Sep 3, 2008, 07:25 UTC
Message-ID
<20080903072556.GA18449@atjola.homenet>
In-Reply-To
<20080903072011.GA14252@atjola.homenet>
On 2008.09.03 09:20:11 +0200, Björn Steinbrink wrote:
Show 36 quoted lines
> 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.

I knew I would forget something... That's with: $ git --version git version 1.6.0.1.196.g01914

Björn
Previous: Björn SteinbrinkNext: Junio C Hamano
Message 2 of 9 in “Merge seems to get confused by (reverted) cherry-picks”
  1. Björn SteinbrinkSep 3, 2008
  2. Björn SteinbrinkSep 3, 2008
  3. Junio C HamanoSep 3, 2008
  4. Björn SteinbrinkSep 3, 2008
  5. Linus TorvaldsSep 3, 2008
  6. Ittay DrorSep 3, 2008
  7. Andreas EricssonSep 3, 2008
  8. Johan HerlandSep 3, 2008
  9. Mike HommeySep 3, 2008

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.