On Thu, Mar 27, 2014 at 11:55 PM, Jens Lehmann <jens.lehm...@web.de> wrote:
> 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 Herland, <jo...@herland.net>
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html