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

Re: git-mv redux: there must be something else going on

From
Nicolas Pitre <nico@fluxnic.net>
Date
Feb 3, 2010, 20:44 UTC
Message-ID
<alpine.LFD.2.00.1002031533560.1681@xanadu.home>
In-Reply-To
<ron1-34F9C6.12273203022010@news.gmane.org>
On Wed, 3 Feb 2010, Ron Garret wrote:
Show 5 quoted lines
> OK, on closer reading I see that the information is there, but it's well 
> hidden :-)  (For example, the -M option takes an optional numerical 
> argument so you can tweak how much similarity is needed to be considered 
> a move.  But the docs for git log don't mention this.  It's buried deep 
> in the git diffcore docs.  But yes, it's there.)

The doc is indeed not perfect. Probably the -M option and friends could be listed again in the git-log and git-diff pages with a more casual explanation.

Show 5 quoted lines
> So I think I'm beginning to understand how this works, but that leads me 
> to another question: it seems to me that there are potential screw cases 
> for this purely content-based system of tracking files.  For example, 
> suppose I have a directory full of sample config files, all of which are 
> similar to each other.  Will that cause diffcore to get confused?

There are ways to fool the heuristics indeed. But overall it is still more reliable than manually having to record the rename into the tool since humans are known for screwing these things up more often than machines. And again the heuristics can be modified after the fact if needed, unlike the manually recorded false renames (or lack of rename record) which will remain wrong unless another manual correction is applied to the database.

Nicolas
Previous: Junio C HamanoNext: Pete Harlan
Message 16 of 20 in “git-mv redux: there must be something else going on”
  1. Ron GarretFeb 3, 2010
  2. Avery PennarunFeb 3, 2010
  3. Ron GarretFeb 3, 2010
  4. Avery PennarunFeb 3, 2010
  5. Ron GarretFeb 3, 2010
  6. Nicolas PitreFeb 3, 2010
  7. Ron GarretFeb 3, 2010
  8. Ron GarretFeb 3, 2010
  9. Avery PennarunFeb 3, 2010
  10. Ron GarretFeb 3, 2010
  11. Avery PennarunFeb 3, 2010
  12. Jay SoffianFeb 3, 2010
  13. Ron GarretFeb 4, 2010
  14. Ron GarretFeb 4, 2010
  15. Junio C HamanoFeb 4, 2010
  16. Nicolas PitreFeb 3, 2010
  17. Pete HarlanFeb 3, 2010
  18. Ron GarretFeb 3, 2010
  19. Documentation: clarify git-mv behaviour wrt dirty filesThomas Rast, Feb 3, 2010
  20. Junio C HamanoFeb 3, 2010

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.