Re: Possible regression in master? (submodules without a "master" branch)
- From
Johan Herland <johan@herland.net>
- Date
- Mar 27, 2014, 23:27 UTC
- Message-ID
- <CALKQrgeLY2ziW2jOoWgNcsBR6EE4rnmkYN6Z1iiGXDtiECE8og@mail.gmail.com>
- In-Reply-To
- <5334AC59.7010605@web.de>
On Thu, Mar 27, 2014 at 11:55 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Show 26 quoted lines
> Am 27.03.2014 19:30, schrieb Junio C Hamano: >> - For a repository that does not have that "branch" thing >> configured, the doc says that it will default to 'master'. >> >> I do not think this was brought up during the review, but is it a >> sensible default if the project does not even have that branch? >> >> What are viable alternatives? >> >> - use 'master' and fail just the way Johan saw? >> >> - use any random branch that happens to be at the same commit as >> what is being checked out? >> >> - use the branch "clone" for the submodule repository saw the >> upstream was pointing at with its HEAD? >> >> - something else? > > Good question. Me thinks that when a superproject doesn't have > 'branch' configured and does set 'update' to something other than > 'checkout' for a submodule it should better make sure 'master' > is a valid branch in there. Everything else sounds like a > misconfiguration on the superproject's part that warrants an > error. But I may be wrong here as I only use 'checkout' together > with a detached HEADs myself. Comments welcome.
I believe unset 'branch' and 'update' != 'checkout' is somewhat analogous to unset branch.<name>.merge while pulling. I.e. "you have told me to merge/rebase, but you have not told me against which branch, therefore error out".
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net