Matheus Tavares Bernardino <matheus.bernardino@xxxxxx> writes: > 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.