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

Re: [PATCH 2/2] Do the fuzzy rename detection limits with the exact renames removed

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 27, 2007, 00:12 UTC
Message-ID
<alpine.LFD.0.999.0710261708520.30120@woody.linux-foundation.org>
In-Reply-To
<alpine.LFD.0.999.0710261654300.30120@woody.linux-foundation.org>
On Fri, 26 Oct 2007, Linus Torvalds wrote:
Show 5 quoted lines
> 
> Works For Me(tm), although this isn't all that obviously testable (ie I 
> should find a test that is border-line, and triggers the rename detection 
> limits, but then has enough exact renames that the rename detection array 
> goes away).

Actually, I just tested it. I used that same 100,000 file thing, but added one more (larger) file, and did another commit that moved the 100,000 files exactly, and the one larger file with a small change.

The code before this patch (but with my linear-time rename changes) would find the 100,000 exact renames, but would *not* find the one that had a small change, because it would hit the rename limit, and wouldn't even try.

With these two patches in place, it finds all the exact renames, and once it has done that, the resulting rename array is small enough (one single unknown target remaining, even if there are 100,001 possible source files) that it doesn't trigger the rename limit, and it now finds the remaining non-exact rename too.

So it not only looked obvious, it seems to work too.
		Linus
Previous: Linus Torvalds
Message 3 of 3 in “Fix ugly magic special case in exact rename detection”
  1. 1/2 Fix ugly magic special case in exact rename detectionLinus Torvalds, Oct 26, 2007
  2. 2/2 Do the fuzzy rename detection limits with the exact renames removedLinus Torvalds, Oct 26, 2007
  3. Linus TorvaldsOct 27, 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.