Thread (38 messages) flat view 38 messages, 5 authors, 2016-06-15

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

From: Francesco Pretto <hidden>
Date: 2016-06-15 22:59:37

Possibly related (same subject, not in this thread)

2014/1/7 Junio C Hamano [off-list ref]:
quoted
Unless you decide to go with the proposed approach of Trevor, where
"submodule.<name>.branch" set means attached (if it's not changed:
this thread is quite hard to follow...). To this end, Junio could sync
with more "long-timers" (Heiko?) submodule users/devs to understand if
this breaks too much or not.
It is not immediately obvious to me why anybody who specifies the
submodule.*.branch variable to say "I want _that_ branch" not to
want to be on that branch but in a detached state, so from that
perspective, submodule.*.attach feels superfluous.
Junio, for what it concerns me I fully support this patch as, IMO, it
makes cleaner the role of the property "submodule.<name>.branch".
Because with my original proposal I decided to go non-breaking Heiko
and Jens could also take position on this because this patch will
represent a small behavior break.

Also, and important feature should be added together with this patch:
a way to go "--remote" by default on an attached HEAD. This can be
done at least in two ways:
- explicit, non breaking way: add a "submodule.<name>.remote"
property. When set to "true" it implies "--remote" when doing "git
submodule update", both on attached and detached HEAD;
- implicit, breaking way: assume "--remote" when doing "git submodule
update" on an attached HEAD. I am quite sure this will break a couple
of submodule tests (I already tried it), probably for marginal
reasons.

I think this is needed because it makes little sense to having an
attached HEAD and "git submodule update" does nothing.

Thank you,
Francesco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help