From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id F35011F55B for ; Wed, 13 May 2020 00:19:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728314AbgEMARK (ORCPT ); Tue, 12 May 2020 20:17:10 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:60524 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728220AbgEMARJ (ORCPT ); Tue, 12 May 2020 20:17:09 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 690865BF2C; Tue, 12 May 2020 20:17:07 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=hrLZquschmkjyFhXpDPFjDSJfhE=; b=F2sfXe eLDOBi+QDG+qcPbJWq0zlqlDfvbGskmirNifxFuuSKwKciVsEKpILQg3XenCZ2Mu gfhi5QvOI/ZfDT5MO0UZSKr0PvJqTf4XiVur7g23Sna08yk48V+zn76zYzy4wpPn 8fXGIdEx8JEyGzc/kxiLk6u1jje1U+I4r0UYU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Ey2Oui800Crtm1MgLt8wPDKyBj7fvHRe YgpDQLn3COQQMmblbJzqjCD4GSAAED/r0m7Z6cWmweyGitZxh2rRKCE18QYTjoMx gtjmEMbuGoOC6ErpbehRH+YC5cNU4w7lAmkj+hScT/oMwwPR//y5RsEzJOqOII8B atQsm3phrHI= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 5F0055BF2B; Tue, 12 May 2020 20:17:07 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id CB4935BF2A; Tue, 12 May 2020 20:17:06 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Matheus Tavares Bernardino Cc: git , Derrick Stolee , Elijah Newren , Jonathan Tan Subject: Re: [RFC PATCH v2 3/4] grep: honor sparse checkout patterns References: Date: Tue, 12 May 2020 17:17:06 -0700 In-Reply-To: (Matheus Tavares Bernardino's message of "Tue, 12 May 2020 21:05:18 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 1445BBCE-94AF-11EA-B3E8-C28CBED8090B-77302942!pb-smtp1.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Matheus Tavares Bernardino 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.