Thread (16 messages) flat view 16 messages, 8 authors, 2016-06-15

Re: [PATCH] diffcore-rename: favour identical basenames

From: Jeff King <hidden>
Date: 2016-06-15 22:43:17

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

You really don't care about "is this a good match" as much as providing
an order to potential matches. I think something like a Levenshtein
distance between the full pathnames would give good results, and would
cover almost every situation that the basename heuristic would (there
are a few exceptions, like getting "file.c" from either "file2.c" or
"foo/file.c", but that seems kind of pathological).

Sorry to post without a patch, but I don't have time right this second.
I'll add it to the end of my (ever-growing) todo list if you think it's
a good idea and don't do it yourself. :)

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help