Re: [PATCH v2 3/5] diffcore-rename: enable limiting rename detection to relevant destinations
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jun 3, 2021, 12:54 UTC
- Message-ID
- <1016e500-8169-7bb3-8428-b5ea35d19630@gmail.com>
- In-Reply-To
- <45e1de5fe7808f5297d5e33d14c239d74de33bdc.1622559516.git.gitgitgadget@gmail.com>
On 6/1/2021 10:58 AM, Elijah Newren via GitGitGadget wrote:
Show 9 quoted lines
> From: Elijah Newren <newren@gmail.com> > > Our former optimizations focused on limiting rename detection to a > pre-specified set of relevant sources. This was because the merge logic > only had a way of knowing which sources were relevant. However, other > callers of rename detection might benefit from being able to limit > rename detection to a known set of relevant destinations. In > particular, a properly implemented `git log --follow` might benefit from > such an ability.
I would be interested in seeing such an improvement. It could also help the batch-download of missing blobs in a partial clone situation because it would only need the "deletes" portion of the diff, since we only care about one "add" (we'd need that blob, too, of course).
> Since the code to implement such limiting is very similar to what we've > already done, just implement it now even though we do not yet have any > callers making use of this ability.
However, I'm not sure that this change is warranted without such an integration. Perhaps keep this patch here on the list as a reference for anyone who wants to do the `git log --follow` speedup? This person can include "you in the future".
I'm just worried that without a consumer, this code has no automated validation and can either be buggy now or become buggy in the future before someone starts trying to use the logic.
Thanks, -Stolee