Re: [RFC PATCH v2 3/4] grep: honor sparse checkout patterns
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 13, 2020, 00:17 UTC
- Message-ID
- <xmqqsgg4wuwt.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAHd-oW4k-9ZHQJcqEUqzxw0YShPWCaG61=v4wyBvXte2sSTV5g@mail.gmail.com>
Matheus Tavares Bernardino <matheus.bernardino@usp.br> writes:
Show 9 quoted lines
> The idea behind not skipping gitlinks here was to be compliant with
> what we have in the working tree. In 4fd683b ("sparse-checkout:
> document interactions with submodules"), we decided that, if the
> sparse-checkout patterns exclude a submodule, the submodule would
> still appear in the working tree. The purpose was to keep these
> features (submodules and sparse-checkout) independent. Along the same
> lines, I think we should always recurse into initialized submodules in
> grep, and then load their own sparsity patterns, to decide what should
> be grepped within.OK.
I do not necessarily agree with the justification described in 4fd683b (e.g. "would easily cause problems." that is not substantiated is merely an opinion), but I do agree with you that the new code in "git grep" we are discussing here does behave in line with that design.
Thanks.