Thread (4 messages) 4 messages, 3 authors, 2016-06-15

Re: Possible regression in master? (submodules without a "master" branch)

flat view

From: Jens Lehmann <hidden>
Date: 2016-06-15 23:00:33

Am 27.03.2014 16:52, schrieb W. Trevor King:
On Thu, Mar 27, 2014 at 03:21:49PM +0100, Johan Herland wrote:
quoted
I just found a failure to checkout a project with submodules where
there is no explicit submodule branch configuration, and the
submodules happen to not have a "master" branch:
The docs say [1]:

  A remote branch name for tracking updates in the upstream submodule.
  If the option is not specified, it defaults to 'master'.
But the "branch" setting isn't configured for Qt, the .gitmodules
file contains only this:

[submodule "qtbase"]
	path = qtbase
	url = ../qtbase.git
...
which is what we do now.  Working around that to default to the
upstream submodule's HEAD is possible (you can just use --branch
HEAD), but I think it's easier to just explicitly specify your
preferred branch.
That is *not* easier, as Johan did not have to do that before.

I think your patch 23d25e48f5ead73c9ce233986f90791abec9f1e8 does
not do what the commit message promised:

    With this change, folks cloning submodules for the first time via:

      $ git submodule update ...

    will get a local branch instead of a detached HEAD, unless they are
    using the default checkout-mode updates.

And Qt uses the "default checkout-mode updates" and doesn't have
"branch" configured either. So we are facing a serious regression
here.
Cheers,
Trevor

[1]: submodule.<name>.branch in gitmodules(5)
     http://git-scm.com/docs/gitmodules.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help