From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [RFC_PATCHv4 1/7] git submodule: teach `add` to label submodules Date: Tue, 22 Mar 2016 15:28:03 -0700 Message-ID: References: <1458612372-10966-1-git-send-email-sbeller@google.com> <1458612372-10966-2-git-send-email-sbeller@google.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Jens.Lehmann@web.de, sschuberth@gmail.com, git@vger.kernel.org To: Stefan Beller X-From: git-owner@vger.kernel.org Tue Mar 22 23:28:15 2016 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aiUmc-0007H2-0q for gcvg-git-2@plane.gmane.org; Tue, 22 Mar 2016 23:28:14 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752109AbcCVW2J (ORCPT ); Tue, 22 Mar 2016 18:28:09 -0400 Received: from pb-smtp0.pobox.com ([208.72.237.35]:65459 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751213AbcCVW2I (ORCPT ); Tue, 22 Mar 2016 18:28:08 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp0.pobox.com (Postfix) with ESMTP id 0D2E34E8FF; Tue, 22 Mar 2016 18:28:07 -0400 (EDT) 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=+wB52wYtf1YJtXeBQ0vadgrOFfI=; b=r/t1+h Z95grPUIES7gyiNIfvle/I97Qw+kzHn4MYJJI7axreOg7xm0VsYmBC63UPErLDD1 P0QaEb3Tkqkp0gn1tvfPCYEGF/G5M+SbZxcChcq+aV4S8tpF9LEd1G0zb6BYyhhI WHbOuuEanYP2zl8SRzQ5q8ONJjvZyi3b9SLa0= 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=bl9sut3aBqm99/wB5B6O0qWKdC/pMUHU bi1iczxCiinuOI4LNUlxvSYaLmV55YlQfKdqyurB43CvsAyB07lxLHWwMoZocE0z TGbVaFH40RVVNQlQNyWw+WQzPny/4SfVIOzpUVjub2Sg/W8FpG7EmaEnTKvrzZOP z6p8xc5iXn8= Received: from pb-smtp0.int.icgroup.com (unknown [127.0.0.1]) by pb-smtp0.pobox.com (Postfix) with ESMTP id 04D654E8FE; Tue, 22 Mar 2016 18:28:07 -0400 (EDT) Received: from pobox.com (unknown [104.132.1.64]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp0.pobox.com (Postfix) with ESMTPSA id 31B314E8FD; Tue, 22 Mar 2016 18:28:06 -0400 (EDT) In-Reply-To: <1458612372-10966-2-git-send-email-sbeller@google.com> (Stefan Beller's message of "Mon, 21 Mar 2016 19:06:06 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Pobox-Relay-ID: 592A667A-F07D-11E5-A3A2-79226BB36C07-77302942!pb-smtp0.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Stefan Beller writes: > When adding new submodules, you can specify the > label(s) the submodule belongs to by giving one or more > --label arguments. This will record each label in the > .gitmodules file as a value of the key > "submodule.$NAME.label". Can you define the semantics of "label" with a bit more detail in the doc? For example, it is unclear from the description if a submodule can have multiple labels (I can read the patch, and I am not asking you to explain it to _me_). It also is unclear if a user can tweak the set of labels a submodule has locally, iow, without modifying .gitmodules that would end up affecting other people. I think the expected use of "label" is to have the whole project to share which labels a given submodule should have (i.e. it is not like branches you can freely create in your repository, but more like tags that give all project participant shared understanding of stable anchoring points), and I am guessing that there is no need for "repository local labels" for that reason, but we'd need to see that kind of design decisions spelled out in the documentation to avoid end-user confusion. Thanks. > Signed-off-by: Stefan Beller > --- > Documentation/git-submodule.txt | 5 ++++- > git-submodule.sh | 14 +++++++++++++- > t/t7400-submodule-basic.sh | 32 ++++++++++++++++++++++++++++++++ > 3 files changed, 49 insertions(+), 2 deletions(-) > > diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt > index 13adebf..c0744eb 100644 > --- a/Documentation/git-submodule.txt > +++ b/Documentation/git-submodule.txt > @@ -9,7 +9,7 @@ git-submodule - Initialize, update or inspect submodules > SYNOPSIS > -------- > [verse] > -'git submodule' [--quiet] add [-b ] [-f|--force] [--name ] > +'git submodule' [--quiet] add [-b ] [-f|--force] [-l|--label