From: Heiko Voigt <hvoigt@hvoigt.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Jens Lehmann <Jens.Lehmann@web.de>,
Robert Dailey <rcdailey.lists@gmail.com>,
Git <git@vger.kernel.org>
Subject: Re: Subtree with submodule inside?
Date: Thu, 7 Aug 2014 18:07:25 +0200 [thread overview]
Message-ID: <20140807160725.GA22597@fair.fritz.box> (raw)
In-Reply-To: <20140806235152.GB12427@google.com>
On Wed, Aug 06, 2014 at 04:51:52PM -0700, Jonathan Nieder wrote:
> 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.
I like this idea. It could solve many issues and help in many cases I think.
Since we are currently quite busy with other things I took the liberty of
adding an ideas section in Jens submodule wiki[1]. This way we do not forget
about it and/or can refer others to it more easily.
I would appreciate if someone could have a look whether I described the idea
clearly enough.
Cheers Heiko
[1] https://github.com/jlehmann/git-submod-enhancements/wiki#dynamic-superproject-refs-in-submodules
prev parent reply other threads:[~2014-08-07 16:07 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
2014-08-07 16:07 ` Heiko Voigt [this message]
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=20140807160725.GA22597@fair.fritz.box \
--to=hvoigt@hvoigt.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--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).