From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Elliot Wolk <elliot.wolk@gmail.com>,
Robin Rosenberg <robin.rosenberg@dewire.com>,
git@vger.kernel.org
Subject: Re: move detection doesnt take filename into account
Date: Wed, 9 Jul 2014 02:45:21 -0400 [thread overview]
Message-ID: <20140709064521.GA14682@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqq61jhxb0g.fsf@gitster.dls.corp.google.com>
On Tue, Jul 01, 2014 at 10:08:15AM -0700, Junio C Hamano wrote:
> I didn't think it through but my gut feeling is that we could change
> the name similarity score to be the length of the tail part that
> matches (e.g. 1.a to a/2.a that has the same two bytes at the tail
> is a better match than to a/2.b that does not share any tail, and to
> a/1.a that shares the three bytes at the tail is an even better
> match).
The delta heuristics in pack-objects use pack_name_hash, which claims:
/*
* This effectively just creates a sortable number from the
* last sixteen non-whitespace characters. Last characters
* count "most", so things that end in ".c" sort together.
*/
which might be another option (and seems like a superset of the basename
check, short of basenames that are longer than 16 characters).
-Peff
next prev parent reply other threads:[~2014-07-09 6:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-30 6:38 move detection doesnt take filename into account Elliot Wolk
2014-07-01 9:16 ` Robin Rosenberg
2014-07-01 14:40 ` Elliot Wolk
2014-07-01 14:57 ` Junio C Hamano
2014-07-01 15:05 ` Elliot Wolk
2014-07-01 17:08 ` Junio C Hamano
2014-07-09 6:45 ` Jeff King [this message]
2014-07-09 15:51 ` Junio C Hamano
2014-07-09 22:03 ` Jeff King
2014-07-09 22:18 ` Junio C Hamano
2014-07-10 3:53 ` Jeff King
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=20140709064521.GA14682@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=elliot.wolk@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=robin.rosenberg@dewire.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).