Subject: Re: [PATCH v4 0/3] diff: add pathspec support to --no-index

From: Jacob Keller <[email-masked]>
Date: Thu, 22 May 2025 14:50:04 -0700

On 5/22/2025 2:37 PM, Junio C Hamano wrote:
> Jacob Keller <[email-masked]> writes:
> 
>> From: Jacob Keller <[email-masked]>
>>
>> This series adds support for using pathspecs to limit the comparison when
>> using git diff --no-index. This is similar to how you can limit what is
>> included with pathspecs when comparing inside a repository.
>>
>> This version uses only one set of pathspecs and instead uses some logic to
>> skip past the root of each directory tree being scanned. This avoids needing
>> to parse pathspecs multiple times, and is overall a simpler approach.
>> ...
>> I tried a couple of different methods for skipping past the leading portion
>> of a path, including skip_prefix. Ultimately just the index to skip to
>> seemed like the simplest solution. I like that it means we only need a
>> single pathspec array now, and that we no longer have to worry about
>> changing prefix_path_gently.
> 
> 
> Nice.  I kept the previous iteration out of 'seen' primarily because
> it seemed to break the tests (even though it passed standalone).
> Let me see how well we do with this iteration.
> 
> Will queue.  Thanks.

The tests all passed for me on their own, but maybe something is flaky?

My guess would be that the changes to prefix_path_gently which are now
dropped would be the most likely culprit of some sort of intermittent
failure since the rest of the changes are fairly well separated to just
the diff-no-index.c code.

Thanks,
Jake