Subject: Re: [RFC v2] submodule: Respect requested branch on all clones

From: Junio C Hamano <[email-masked]>
Date: Mon, 06 Jan 2014 13:32:52 -0800

"W. Trevor King" <[email-masked]> writes:

>> And wouldn't it make it unnecessary to have a new "re-attach" option
>> if such a mode that never have to detach is used?
>
> I think so, but we currently don't have a "never detached" route for
> folks that are cloning submodules via update (instead of via
> 'submodule add').  Currently, new clone-updates will always leave you
> with a detached HEAD (unless you have branch-creation in your update
> !command).  My patch aims to close this detached-HEAD gap, for folks
> we expect will be doing local development, by creating an initial
> branch at clone-update time.

I am not a submodule expert so I may be missing some other gaps, but
what your change does sounds sensible to me.