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

Re: git rebase bug?

From
Jeff King <peff@peff.net>
Date
Jul 8, 2010, 11:37 UTC
Message-ID
<20100708113731.GC2294@sigill.intra.peff.net>
In-Reply-To
<m3bpajm0gw.fsf@localhost.localdomain>
On Wed, Jul 07, 2010 at 02:44:50PM -0700, Jakub Narebski wrote:
Show 6 quoted lines
> > Oh, makes sense. Thanks. So that's a quite troubling corner case...
> > I wonder if empty files shouldn't be special cased...
> 
> Well, similarity score (of contents and of filename) is weighted by
> contents length, but perhaps empty files / zero length somehow fall
> out as an edge case...

Exact rename detection is handled before inexact detection, so the contents length are irrelevant. So it is not about empty files, but about exact matches. I'm not sure if the basename-matching code is used for exact matches, though. But ideally we would break exact-match ties based on filename. I'd have to read through the code and/or perform some tests to be sure, though.

-Peff
Previous: Mike Hommey
Message 6 of 6 in “git rebase bug?”
  1. Mike HommeyJul 7, 2010
  2. Björn SteinbrinkJul 7, 2010
  3. Mike HommeyJul 7, 2010
  4. Jakub NarebskiJul 7, 2010
  5. Mike HommeyJul 8, 2010
  6. Jeff KingJul 8, 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.