Re: [PATCH] diffcore-rename: favour identical basenames
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 21, 2007, 14:03 UTC
- Message-ID
- <Pine.LNX.4.64.0706211459140.4059@racer.site>
- In-Reply-To
- <20070621131915.GD4487@coredump.intra.peff.net>
Hi,
On Thu, 21 Jun 2007, Jeff King wrote:
Show 9 quoted lines
> On Thu, Jun 21, 2007 at 12:52:11PM +0100, Johannes Schindelin wrote: > > > When there are several candidates for a rename source, and one of them > > has an identical basename to the rename target, take that one. > > That's a reasonable heuristic, but it unfortunately won't match simple > things like: > > i386_widget.c -> arch/i386/widget.c
That's right. But every heuristic falls down eventually. Personally, I think basename_same() is good enough, even if the technical challenge to implement a small enough Levenshtein, which still respects directory boundaries somehow (and not just throws them away).
Besides, Levenshtein would introduce a ranking, not a boolean value like basename_same(). And that complicates the code.
All in all, I'd say Levenshtein is not worth the _result_.
Ciao, Dscho