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

Re: [PATCH/RFC 0/3] faster inexact rename handling

From
Jeff King <peff@peff.net>
Date
Oct 30, 2007, 13:43 UTC
Message-ID
<20071030134355.GA21342@coredump.intra.peff.net>
In-Reply-To
<alpine.LFD.0.999.0710292156580.30120@woody.linux-foundation.org>
On Mon, Oct 29, 2007 at 10:06:11PM -0700, Linus Torvalds wrote:
> Have you compared the results? IOW, does it find the *same* renames?
>From my limited testing, it generally finds the same pairs. However,

there are a number of renames that it _doesn't_ find, because they are composed of "uninteresting" lines, dropping them below the minimum score. Try (in git.git):

  git-show --raw -M -l0 :/'Big tool rename'

with the old and new code. Pairs like Documentation/git-add-script.txt -> Documentation/git-add.txt are not found, because the file is composed almost entirely of boilerplate.

Moving the size normalization into the similarity engine should probably fix that, and will let us compare old and new results more accurately. I'll try to work on that.

> I'm a bit worried about the fact that you just pick a single (arbitrary) 
> src/dst per fingerprint. Yes, it should be limited, but that seems to be a 
> bit too *extremely* limited. But if it gives the same results in practice, 
> maybe nobody cares?

Yes, I have not convinced myself yet that it's the right approach (but it seemed like a good place to try first, for simplicity and speed). As I noted, this approach seems to be a bit memory hungry on large, so I am a bit concerned about increasing the size of the fingerprint_entry structure. However, Andy's sampling approach might help fix that.

The current code also doesn't bother marking overflow, so common lines get attributes to some random file (actually, worse than random: if a bunch of files have the same common lines, _all_ of the lines will go to the last file, which means we subtly favor renames from the end of the input list). So probably it should be tested as-is, with an "overflow, this line is too common to be interesting" bit, and with a small-ish limit (I had at one point tried 5, but the implementation was naive and too memory-hungry).

-Peff
Previous: Jeff KingNext: Linus Torvalds
Message 8 of 13 in “faster inexact rename handling”
  1. 0/3 faster inexact rename handlingJeff King, Oct 30, 2007
  2. 1/3 change hash table calling conventionsJeff King, Oct 30, 2007
  3. 2/3 introduce generic similarity libraryJeff King, Oct 30, 2007
  4. 3/3 handle renames using similarity engineJeff King, Oct 30, 2007
  5. Linus TorvaldsOct 30, 2007
  6. Junio C HamanoOct 30, 2007
  7. Jeff KingOct 30, 2007
  8. Jeff KingOct 30, 2007
  9. Linus TorvaldsOct 30, 2007
  10. Jeff KingOct 30, 2007
  11. Linus TorvaldsOct 30, 2007
  12. Andy COct 31, 2007
  13. Andy COct 31, 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.