Re: Re: [PATCH 2/2] Introduce git submodule attached update
- From
Heiko Voigt <hvoigt@hvoigt.net>
- Date
- Jan 7, 2014, 22:51 UTC
- Message-ID
- <20140107225128.GC10782@sandbox-ub>
- In-Reply-To
- <20140107041004.GA11060@odin.tremily.us>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, Jan 06, 2014 at 08:10:04PM -0800, W. Trevor King wrote:
Show 16 quoted lines
> 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux)
iEYEARECAAYFAlLMhPAACgkQjLR3Aoip+rqP6wCeIhtpWLJC3XVO3nu2ViQTbHPg T5wAoLLEZ256GOOjBxoTKo2/FmfvQGLp =+bqm -----END PGP SIGNATURE-----