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

Re: [PATCH] diffcore-rename: favour identical basenames

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 21, 2007, 17:52 UTC
Message-ID
<7vfy4lw5yk.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<alpine.LFD.0.98.0706210910390.3593@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 7 quoted lines
> We'e also had things like
>
> 	arch/i386/kernel/pci-pc.c -> arch/i386/kernel/pci/common.c
>
> so it's not always the ending of a file that is unchanged, but you still 
> often have some "similarity" of the name (ie the "pci" substring is still 
> common there).
This is not an example to draw very useful conclusions, is it?

The heuristics to say '-pc => common' is a more likely rename than '-obscure-arch => common' heavily depends on human intelligence in the context of a particular project, the kernel, where there are rules such as "peripherals are tested most widely on PC architectures, so assume that the vendors might have tested their stuff only on PCs".

But I do agree that not limiting to basename has values. Taking example from the "I cannot draw so here is a red big X", it is quite possible that two red big X's are replaced with properly rendered icons, while their format modified, like so:

    images/ok-button.gif => images/buttons/ok.png
    images/cancel-button.gif => images/buttons/cancel.png

This suggests that we might be able to look around to see what other rename src/target candidate files there are, so that we can figure out if there is a common pattern (i.e. in the above example, "patsubst images/%-button.gif,images/buttons/%.png" is what is going on). If we find such a pattern, we can base the assignment of "basename similarity bonus" on that pattern.

Previous: Linus TorvaldsNext: Linus Torvalds
Message 22 of 44 in “Basename matching during rename/copy detection”
  1. Shawn O. PearceJun 21, 2007
  2. Junio C HamanoJun 21, 2007
  3. Andy ParkinsJun 21, 2007
  4. Junio C HamanoJun 21, 2007
  5. Andy ParkinsJun 21, 2007
  6. Johannes SchindelinJun 21, 2007
  7. Andy ParkinsJun 21, 2007
  8. Matthieu MoyJun 21, 2007
  9. Jeff KingJun 21, 2007
  10. Johannes SchindelinJun 21, 2007
  11. Matthieu MoyJun 21, 2007
  12. Johannes SchindelinJun 21, 2007
  13. Steven GrimmJun 21, 2007
  14. Johannes SchindelinJun 21, 2007
  15. Steven GrimmJun 21, 2007
  16. Johannes SchindelinJun 21, 2007
  17. Linus TorvaldsJun 21, 2007
  18. diffcore-rename: favour identical basenamesJohannes Schindelin, Jun 21, 2007
  19. Jeff KingJun 21, 2007
  20. Johannes SchindelinJun 21, 2007
  21. Linus TorvaldsJun 21, 2007
  22. Junio C HamanoJun 21, 2007
  23. Linus TorvaldsJun 21, 2007
  24. Andy ParkinsJun 22, 2007
  25. Johannes SchindelinJun 22, 2007
  26. Aidan Van DykJun 22, 2007
  27. Johannes SchindelinJun 22, 2007
  28. Jeff KingJun 22, 2007
  29. Johannes SchindelinJun 22, 2007
  30. Johannes SixtJun 22, 2007
  31. Johannes SchindelinJun 22, 2007
  32. 100% (was: [PATCH] diffcore-rename: favour identical basenames)David Kastrup, Jun 22, 2007
  33. Johannes SchindelinJun 22, 2007
  34. Junio C HamanoJun 23, 2007
  35. Johannes SchindelinJun 23, 2007
  36. René ScharfeJun 23, 2007
  37. Johannes SchindelinJun 23, 2007
  38. René ScharfeJun 23, 2007
  39. Johannes SchindelinJun 23, 2007
  40. René ScharfeJun 23, 2007
  41. Johannes SchindelinJun 23, 2007
  42. René ScharfeJun 24, 2007
  43. Junio C HamanoJun 23, 2007
  44. Johannes SchindelinJun 23, 2007

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.