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

Re: move detection doesnt take filename into account

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2014, 14:57 UTC
Message-ID
<xmqqtx71xh27.fsf@gitster.dls.corp.google.com>
In-Reply-To
<287177519.16421.1404206204124.JavaMail.zimbra@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> writes:
Show 7 quoted lines
> I think it does, but based on filename suffix. E.g. here is a rename of
> three empty files with a suffix.
>
>  3 files changed, 0 insertions(+), 0 deletions(-)
>  rename 1.a => 2.a (100%)
>  rename 1.b => 2.b (100%)
>  rename 1.c => 2.c (100%)
This is not more than a chance.

We tie-break rename source candidates that have the same content similarity score to a rename destination using "name similarity", whose implementation has been diffcore-rename.c::basename_same(), which scores 1 if `basename $src` and `basename $dst` are the same and 0 otherwise, i.e. from 1.a to a/1.a is judged to be a better rename than from 1.a to a/2.a but otherwise there is nothing that favors rename from 1.a to 2.a over 1.a to 2.b.

Previous: Elliot WolkNext: Elliot Wolk
Message 4 of 11 in “move detection doesnt take filename into account”
  1. Elliot WolkJun 30, 2014
  2. Robin RosenbergJul 1, 2014
  3. Elliot WolkJul 1, 2014
  4. Junio C HamanoJul 1, 2014
  5. Elliot WolkJul 1, 2014
  6. Junio C HamanoJul 1, 2014
  7. Jeff KingJul 9, 2014
  8. Junio C HamanoJul 9, 2014
  9. Jeff KingJul 9, 2014
  10. Junio C HamanoJul 9, 2014
  11. Jeff KingJul 10, 2014

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.