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

Re: merge recursive and code movement

From
Jeff King <peff@peff.net>
Date
Mar 25, 2011, 16:00 UTC
Message-ID
<20110325160013.GA25851@sigill.intra.peff.net>
In-Reply-To
<20110325111225.GC9047@sigill.intra.peff.net>
On Fri, Mar 25, 2011 at 07:12:25AM -0400, Jeff King wrote:
Show 11 quoted lines
> It passes my test, and it doesn't break anything in t/. Yay.
> 
> There's one other call to remove_file in process_renames. It's for the
> case that both sides renamed the same file to the same destination.  I
> think there we need to actually compare the two sides. If only one side
> still has something at the source path, then we can take that side
> (since the other side renamed away the file). But if they both have it
> (i.e., they both installed a replacement), then we need to do the usual
> 3-way merge on that replacement. I'm not sure if we'd have to do that
> ourselves, or if we can just punt and the rest of the merge machinery
> will handle the entry. I'll have to write some tests, I think.

OK, I figured it out. I was thrown off by test failures in t3030, but I think that test is actually wrong; it documents what happens, but not really what we _want_ to have happen.

So this is the patch series I ended up with:
  [1/3]: t3030: fix accidental success in symlink rename
  [2/3]: merge: handle renames with replacement content
  [3/3]: merge: turn on rewrite detection
-Peff
Previous: Jeff KingNext: Jeff King
Message 5 of 14 in “merge recursive and code movement”
  1. Jay SoffianMar 24, 2011
  2. Jeff KingMar 25, 2011
  3. Jeff KingMar 25, 2011
  4. Jeff KingMar 25, 2011
  5. Jeff KingMar 25, 2011
  6. 1/3 t3030: fix accidental success in symlink renameJeff King, Mar 25, 2011
  7. Junio C HamanoMar 25, 2011
  8. Jeff KingMar 25, 2011
  9. Schalk, KenMar 25, 2011
  10. 2/3 merge: handle renames with replacement contentJeff King, Mar 25, 2011
  11. 3/3 merge: turn on rewrite detectionJeff King, Mar 25, 2011
  12. Jay SoffianMar 25, 2011
  13. Techlive ZhengJul 16, 2012
  14. Jeff KingJul 16, 2012

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.