All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: "Mike Hommey" <mh@glandium.org>,
	"Björn Steinbrink" <B.Steinbrink@gmx.de>,
	git@vger.kernel.org
Subject: Re: git rebase bug?
Date: Thu, 8 Jul 2010 07:37:31 -0400	[thread overview]
Message-ID: <20100708113731.GC2294@sigill.intra.peff.net> (raw)
In-Reply-To: <m3bpajm0gw.fsf@localhost.localdomain>

On Wed, Jul 07, 2010 at 02:44:50PM -0700, Jakub Narebski wrote:

> > 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

      parent reply	other threads:[~2010-07-08 11:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 15:05 git rebase bug? Mike Hommey
2010-07-07 18:00 ` Björn Steinbrink
2010-07-07 20:51   ` Mike Hommey
2010-07-07 21:44     ` Jakub Narebski
2010-07-08  9:47       ` Mike Hommey
2010-07-08 11:37       ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100708113731.GC2294@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=B.Steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=mh@glandium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.