Subject: Re: [RFC][PATCH V1] diff-tree: integrate with sparse index

From: Junio C Hamano <[email-masked]>
Date: Tue, 16 May 2023 16:14:05 -0700

Victoria Dye <[email-masked]> writes:

> Longer version: 

Thanks, as usual, for a great review.  A lot of the stuff you wrote
should inspire and result in an improved log message that explains
why this change is sufficient to teach diff-tree to take advantage
of the sparse index.

> However, 'DIFF_SETUP_USE_SIZE_CACHE' seems to be unused as of 6e0b8ed6d35
> (diff.c: do not use a separate "size cache"., 2007-05-07) and nothing about
> 'detect_rename' otherwise indicates index usage, so AFAICT that whole
> condition can be dropped (along with DIFF_SETUP_USE_SIZE_CACHE,
> DIFF_SETUP_REVERSE, and diff_options.setup).

True.  The size cache does not exist anymore.  6b5ee137 (Diff
clean-up., 2005-09-21) restructured the command line option parsing
quite a bit, and we lost DIFF_SETUP_REVERSE, which is a bit that
gets OR'ed in to a file-scope diff_setup_opt static of each of the
command in the diff family.  The bit and the diff_setup_opt variable
got replaced with members of "struct diff_options", and I should
have removed the macro at the same time.

> Note that, if you want to make
> that change in this series, it should be done in a separate patch _before_
> this one (since dropping the deprecated setup infrastructure isn't really
> part of the sparse index integration).

Or after this one, perhaps?  I agree that the clean-up opportunity
you found is very much unrelated to the work to teach diff-tree to
take advantage of the sparse index.

THanks.