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

cache for copy/rename detection

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Nov 26, 2006, 12:59 UTC
Message-ID
<fcaeb9bf0611260459t7afa68eerf4dc66d7eb7fdcc1@mail.gmail.com>

I thought about this lately. git's expensive copy/rename detection can be run once and the results are kept somewhere in .git. Copy/rename detection depends on tree objects and git detection algorithm. Tree objects are immutable and git algorithm change rate is low IMO. So cache invalidation is unlikely to happen.

Another thing I want to do with this cache is ability to manually inject some hints to git. For example, I remove a file. Several commits later, I revive that file in another place. I know that two files are the same but can't tell git (and I don't think Git will detect this pattern). With this cache, I can tell git this file is a copy of that file.

What do you think?
Message 1 of 1 in “cache for copy/rename detection”
  1. Nguyen Thai Ngoc DuyNov 26, 2006

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.