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

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

From
ACAndy C <andychup@gmail.com>
Date
Oct 31, 2007, 00:27 UTC
Message-ID
<596909b30710301727o72770d51jfa519d858203480f@mail.gmail.com>
In-Reply-To
<20071030202014.GA22733@coredump.intra.peff.net>
On 10/30/07, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> On Tue, Oct 30, 2007 at 08:38:24AM -0700, Linus Torvalds wrote:
>
> > > 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.
> >
> > Ok, that does imply to me that we cannot just drop boilerplate text,
> > because the fact is, lots of files contain boilerplate, but people still
> > think they are "similar".
>
> Well, the problem is that instead of just "dropping" boilerplate text,
> we fail to count it as a similarity, but it still counts towards the
> file size. It may be that just dropping it totally is the right thing
> (in which case those renames _will_ turn up, because they will be filled
> with identical non-boilerplate goodness).

Right, in the demo I make an extra pass after the inverted indexing step to prune the index -- which means eliminating the common lines *entirely* from the index (so they don't get attributed to a random file) *and* decrementing all the file sizes by 1. That way the similarity scores shouldn't get skewed.

And as you mentioned we could bump the threshold from 1 to some other small integer. Intuitively I guess you could say it is common to copy a file to 2 places or 3 places, and you don't want all the lines to get thrown out because of that. But usually you don't copy a file to 10 or 50 places.

Andy
Previous: Linus TorvaldsNext: Andy C
Message 12 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.