Re: Subtree with submodule inside?
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 6, 2014, 23:51 UTC
- Message-ID
- <20140806235152.GB12427@google.com>
- In-Reply-To
- <xmqqr40tkxcp.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 18 quoted lines
>> 2. Submodules aware of their superproject and of the parent's branches. >> In other words, submodules would act as though under refs/ they >> had a symlink >> >> parent -> ../../../refs >> >> So you could do >> >> git checkout --recurse-submodules master >> >> cd path/to/submodule >> git checkout parent/heads/next >> >> This would avoid danger from "git gc" in submodules and would >> get rid of most of the motivation for named branches in the >> submodule, I'd think. > > Are you assuming that they share their object stores?
No. The 'symlink' thing is a think-o. (When trying to explain the idea I ended up oversimplifying and speaking nonsense.)
What I wanted to say is that parent/heads/next would be a way to refer from the submodule to the same commit as
refs/heads/next:path/to/submodule
refers to in the parent.
Thanks for clarifying, Jonathan