Subject: Re: Re: [PATCH 2/2] Introduce git submodule attached update

From: Heiko Voigt <[email-masked]>
Date: Tue, 7 Jan 2014 23:51:28 +0100

On Mon, Jan 06, 2014 at 08:10:04PM -0800, W. Trevor King wrote:
> Here's an attempted summary of our desires, and my ideal route
> forward:
> 
> * Preferred local submodule branches for each superproject branch.
>   * Not currently supported by Git.
>   * Requires some sort of per-superproject-branch .git/config.
>   * Fall back to the remote-tracking submodule.<name>.branch?
> 
> * Auto checkout of the preferred branch
>   * Can do this at clone-update time with my patch.
>   * For later submodule branch switches, maybe we want:
> 
>       git submodule checkout [-b <branch>] [<paths>…]
> 
>     Then if a user blows off their detached HEAD, at least they'll
>     feel a bit sheepish afterwards.

Well, for development on a detached HEAD in a submodule we are currently
not very careful anyway. A simple

	git submodule update

will already blow away any detached HEAD work. But AFAIK it should
trigger the "you are leaving commits from a detached HEAD behind"
warning, so there is some safeguard and recovery.

Cheers Heiko