git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
	Robert Dailey <rcdailey.lists@gmail.com>,
	Git <git@vger.kernel.org>, Heiko Voigt <hvoigt@hvoigt.net>
Subject: Re: Subtree with submodule inside?
Date: Wed, 6 Aug 2014 16:51:52 -0700	[thread overview]
Message-ID: <20140806235152.GB12427@google.com> (raw)
In-Reply-To: <xmqqr40tkxcp.fsf@gitster.dls.corp.google.com>

Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>>  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

  reply	other threads:[~2014-08-06 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 17:20 Subtree with submodule inside? Robert Dailey
2014-08-06 17:51 ` Junio C Hamano
2014-08-06 18:18   ` Robert Dailey
2014-08-06 20:14     ` Jens Lehmann
2014-08-06 22:08       ` Jonathan Nieder
2014-08-06 23:32         ` Junio C Hamano
2014-08-06 23:51           ` Jonathan Nieder [this message]
2014-08-07 16:07             ` Heiko Voigt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140806235152.GB12427@google.com \
    --to=jrnieder@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=rcdailey.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).