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

Re: Rename handling

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 19, 2007, 20:44 UTC
Message-ID
<Pine.LNX.4.64.0703191628100.6485@iabervon.org>
In-Reply-To
<45FEE629.8030606@midwinter.com>
On Mon, 19 Mar 2007, Steven Grimm wrote:
Show 5 quoted lines
> Nicolas Pitre wrote:
> > So maybe, just maybe, at the end of the day getting renames right 100% of
> > the time instead of 99% is not such a big thing after all.
> 
> For me personally, that is true -- but I'd still prefer that extra 1%.

I think the discussion of 99% is misleading here. The heuristics aren't random; it's not like if you do 2000 renames, you can expect 20 of them to be mishandled. What's actually going on is that git will get 100% on unambiguous cases; it'll get 100% on slight ambiguities; it'll get 100% on mostly clear cases. On the ~2% of cases where the correct result is arguable, git will choose differently from you half of the time. If you do a rename and have to change most of the lines of the file, git might decide that you rewrote it from scratch. On the other hand, you might have had an easier time rewriting it from scratch. Even more extreme, if you use git-mv to rename a file, and then you totally replace the file with some other content, git will treat it as a remove and an add, rather than a rename and a total rewrite. But making it a remove and an add is the sensible interpretation of the change, anyway.

I'd actually guess that git's analysis is at least as likely to be useful as the reference human analysis that the 1% error rate is measured against.

	-Daniel
*This .sig left intentionally blank*
Previous: Nicolas PitreNext: Andy Parkins
Message 15 of 31 in “Rename handling”
  1. John GoerzenMar 19, 2007
  2. Steven GrimmMar 19, 2007
  3. Nicolas PitreMar 19, 2007
  4. Linus TorvaldsMar 19, 2007
  5. Steven GrimmMar 19, 2007
  6. Martin LanghoffMar 19, 2007
  7. Junio C HamanoMar 20, 2007
  8. Linus TorvaldsMar 19, 2007
  9. Robin RosenbergMar 19, 2007
  10. Linus TorvaldsMar 19, 2007
  11. Steven GrimmMar 19, 2007
  12. Steven GrimmMar 19, 2007
  13. Linus TorvaldsMar 19, 2007
  14. Nicolas PitreMar 19, 2007
  15. Daniel BarkalowMar 19, 2007
  16. Andy ParkinsMar 19, 2007
  17. Steven GrimmMar 19, 2007
  18. Jakub NarebskiMar 21, 2007
  19. Johannes SchindelinMar 21, 2007
  20. Steven GrimmMar 21, 2007
  21. Johannes SchindelinMar 21, 2007
  22. Linus TorvaldsMar 21, 2007
  23. Martin LanghoffMar 22, 2007
  24. Jakub NarebskiMar 22, 2007
  25. Martin LanghoffMar 22, 2007
  26. Jakub NarebskiMar 22, 2007
  27. Linus TorvaldsMar 22, 2007
  28. Daniel BarkalowMar 19, 2007
  29. John GoerzenMar 19, 2007
  30. Junio C HamanoMar 19, 2007
  31. Jakub NarebskiMar 21, 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.