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

Re: --find-copies-harder finds fewer copies/renames than -C does

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2011, 18:59 UTC
Message-ID
<7voc7vch35.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1jukub7.uehx43wxtij7M%lists@haller-berlin.de>
lists@haller-berlin.de (Stefan Haller) writes:
Show 11 quoted lines
> The reason for this seems to be the condition
> "num_create * num_src > rename_limit * rename_limit" in diffcore_rename;
> --find-copies-harder exeeds the limit, so it turns off inexact rename
> dectection *completely*, while -C stays well below the limit.
>
> I had expected --find-copies-harder to still do inexact rename detection
> among the changed files in the commit in this case, and turn it off only
> for the unmodified files; I'm not familiar enough with the code to tell
> whether that would be easy to implement though.
>
> Any thoughts?

Two. When you can spend unlimited amount of resources, it would feel more intuitive if -C -C lifted rename-limit altogether. On the other hand, in a project where the difference does matter (i.e. you have far too many candidate sources), it is likely that -C -C without rename limit would run out of memory and not produce any result, so automatic lifting of rename limit is unacceptable as the default.

Setting rename-limit to match the size of your environment (perhaps do this once in the config) would make this a non-issue, so coming up with an automated way to do so might be an interesting exercise.

Previous: Stefan HallerNext: Stefan Haller
Message 2 of 4 in “--find-copies-harder finds fewer copies/renames than -C does”
  1. Stefan HallerJan 5, 2011
  2. Junio C HamanoJan 5, 2011
  3. Stefan HallerJan 6, 2011
  4. Junio C HamanoJan 6, 2011

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.