Re: [PATCH 1/2] diffcore-rename: support rename cache

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nguyen Thai Ngoc Duy <pclouds@...>
Cc: Yann Dirson <ydirson@...>, Junio C Hamano <gitster@...>, <git@...>
Date: Saturday, November 8, 2008 - 10:04 pm

On Sat, Nov 08, 2008 at 07:00:10PM +0700, Nguyen Thai Ngoc Duy wrote:


Hmm, yeah. I was thinking you might be able to do some kind of cut-off
on the caching (i.e., don't bother storing anything that didn't come
close). But you can't safely assume that because an entry isn't there,
it isn't worth seeing (since it might also just not have been computed
yet). You could still organize by commit, and then each commit is either
fully computed or not. But then you still have a pathspec problem.

One thing you could do is just compute the rename score between all
pairs, even if a pathspec is given, limit it to values over "0.5" (or
something low, but that eliminates the totally uninteresting cases), and
then store that as the complete cache for that commit (or tree pair, if
you want to support that).

Then you would have the full information and could do an arbitrary
pathspec limit on it. If you wanted to set the rename threshold below
0.5, then we would have to recompute without the cache (but in practice,
that should be rare).

The real downside is that you pay for the whole-tree detection when you
have asked for a pathspec (but only the first time, after which you can
always generate from cache).

Just thinking out loud...

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] diffcore-rename: support rename cache, Nguyễn Thái Ngọc Duy..., (Fri Nov 7, 10:35 am)
Re: [PATCH 1/2] diffcore-rename: support rename cache, Junio C Hamano, (Fri Nov 7, 7:17 pm)
Re: [PATCH 1/2] diffcore-rename: support rename cache, Nguyen Thai Ngoc Duy, (Sat Nov 8, 12:01 am)
Re: [PATCH 1/2] diffcore-rename: support rename cache, Nguyen Thai Ngoc Duy, (Sat Nov 8, 8:00 am)
Re: [PATCH 1/2] diffcore-rename: support rename cache, Jeff King, (Sat Nov 8, 10:04 pm)
Re: [PATCH 1/2] diffcore-rename: support rename cache, Nguyen Thai Ngoc Duy, (Sat Nov 8, 5:29 am)
[PATCH 2/2] diffcore-rename: add config option to allow to c..., Nguyễn Thái Ngọc Duy..., (Fri Nov 7, 10:35 am)