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

limiting rename detection during merge is a really bad idea

From
Steffen Prohaska <prohaska@zib.de>
Date
Feb 11, 2008, 06:19 UTC
Message-ID
<CF28A4AE-62F0-4E41-9794-2CF85C2C7855@zib.de>

I almost lost faith in git's merging capabilities because merge- recursive limits rename detection to the default limit if not configured otherwise. I tried to do a large merge and was pretty convinced that git would handle the merge easily. But it unexpectedly failed to detect the renames. The reason is that merge-recursive uses the diff_rename_limit_default, which is 100, and this was too low in my case.

After debugging all the merge and diff machinery I found out that I just need to set diff.renamelimit=0 and everything works smoothly.

Well, it was an interesting debugging experience and I learnt a lot about the diffcore. Nonetheless this was one of the worst experiences I had with git and it kept me from doing more important work.

I think that limiting rename detection during merge is a really bad idea. Either we should set it to unlimited, or at least we should print a BIG WARNING that rename detection is limited during the merge. I'd propose to override diff.renamelimit to unlimited for a merge, even if diff.renamelimit is explicitly configured by the user. It doesn't make sense not to detect renames during a merge.

Opinions?
	Steffen
Next: Marco Costalba
Message 1 of 11 in “limiting rename detection during merge is a really bad idea”
  1. Steffen ProhaskaFeb 11, 2008
  2. Marco CostalbaFeb 11, 2008
  3. Jeff KingFeb 11, 2008
  4. Marco CostalbaFeb 11, 2008
  5. Jeff KingFeb 11, 2008
  6. Lars HjemliFeb 11, 2008
  7. Jeff KingFeb 11, 2008
  8. Santi BéjarFeb 11, 2008
  9. Jeff KingFeb 11, 2008
  10. Steffen ProhaskaFeb 11, 2008
  11. Jeff KingFeb 11, 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.