git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Brandon Williams <bmwill@google.com>
Cc: "Randall S. Becker" <rsbecker@nexbridge.com>,
	Ciro Santilli <ciro.santilli@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Add an option to automatically submodule update on checkout
Date: Mon, 8 May 2017 10:15:35 -0700	[thread overview]
Message-ID: <CAGZ79kbNEAL6dYFPzquDDAsMNqpFsE3_VEHXeKu1VuaLV+m8_w@mail.gmail.com> (raw)
In-Reply-To: <20170508170846.GD179149@google.com>

On Mon, May 8, 2017 at 10:08 AM, Brandon Williams <bmwill@google.com> wrote:
>>
>> >[submodule "gnulib"]
>> >    path=./gnulib
>> >    external = true # implies no branch for checkout -b --recurse-submodules
>>
>> >I think there are a couple more situations where such "external" submodules are treated differently, so maybe we'd want to think carefully about the >actual name as different workflows would want to have different features for an internal/external submodule.
>>
>> I didn't want to open up that one, but yes. That makes sense. However, I don't like overloading what "external" means or might mean in the future. Would you consider a distinct Boolean for that, like inherit-branch=true?
>
> Something like that kind of already exists.  The 'branch' field.
> Internal repos would most likely use the '.' value to indicate that the
> submodules should track the superproject's branch.  While a value of say
> 'foo' would indicate that the submodule should always be on branch
> 'foo'; this could be used for external repositories.

so for external repos you'd keep the branch unset, such that
you strictly checkout the sha1 object into a detached HEAD.

Makes sense.

Thanks,
Stefan

  reply	other threads:[~2017-05-08 17:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-06  8:37 Add an option to automatically submodule update on checkout Ciro Santilli
2017-05-08 14:42 ` Randall S. Becker
2017-05-08 16:25   ` Stefan Beller
2017-05-08 16:46     ` Randall S. Becker
2017-05-08 16:54       ` Stefan Beller
2017-05-08 17:05         ` Randall S. Becker
2017-05-08 17:08           ` Brandon Williams
2017-05-08 17:15             ` Stefan Beller [this message]
2017-05-09  2:58       ` Junio C Hamano
2017-05-09 13:00         ` Randall S. Becker
2017-05-08 16:48     ` Brandon Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZ79kbNEAL6dYFPzquDDAsMNqpFsE3_VEHXeKu1VuaLV+m8_w@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=bmwill@google.com \
    --cc=ciro.santilli@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rsbecker@nexbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).