Re: [PATCH] RFC: A new type of symbolic refs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 18, 2017, 19:03 UTC
- Message-ID
- <xmqq60eppnxk.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kY=j-sgrAFwAhP-_9EKBsa6FXARaVuCxM6gPHV7M+1OAA@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 16 quoted lines
>> Even if we limit ourselves to pointing at the index of the >> superproject, there probably are a handful of interesting issues >> that need to be clarified (not in the sense of "this and that issues >> exist, so this won't be a useful feature", but in the sense of "we'd >> be able to do these useful things using this feature, and we need to >> fill in more details"), such as: >> >> - Making new commits in the submodule available to the upstream. >> Just like a detached HEAD in the submodule, this is not tied to >> any concrete branch, and it is unclear how a recursive "push" >> from the superproject should propagate the changes to the >> upstream of the submodule; > > In Gerrit land people are trained to use > git push HEAD:refs/for/master > which would work fine when propagated to the submodule as-is.
What I was alluding to is how you find 'master' in 'for/master', given the submodule HEAD which only says "I point at the index of the superproject". Note that 'master' here refers to a branch in the submodule. If we further limit ourselves and declare that a submodule that uses this external-reference as HEAD must always be on the same branch as the superproject is on, then we can find what branch the superproject is on, and use that.