From: Jonathan Nieder <jrnieder@gmail.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Robert Dailey <rcdailey.lists@gmail.com>,
Junio C Hamano <gitster@pobox.com>, Git <git@vger.kernel.org>,
Heiko Voigt <hvoigt@hvoigt.net>
Subject: Re: Subtree with submodule inside?
Date: Wed, 6 Aug 2014 15:08:32 -0700 [thread overview]
Message-ID: <20140806220832.GA12427@google.com> (raw)
In-Reply-To: <53E28CAB.4040800@web.de>
Jens Lehmann wrote:
> There were thoughts about having "git branch" optionally create a
> branch in the submodule too. But in a lot of real world scenarios
> that won't help because the same branch name won't necessarily make
> sense in superproject and submodule at the same time
So, here is how I think git could behave to make that into a
non-issue:
1. Commands like 'git checkout' able to recurse into submodules, so
when you switch branches in the superproject, the files in the
submodule are at the right commit, too.
Luckily your series does that. Ronnie was helping me with thoughts
about how to simplify the patch a little, and I'd be happy to talk
with or coordinate with anyone else interested (by email or on IRC
--- I am jrnieder on Freenode).
2. Submodules aware of their superproject and of the parent's branches.
In other words, submodules would act as thought 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.
3. That's it.
Sensible?
Thanks,
Jonathan
next prev parent reply other threads:[~2014-08-06 22:08 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 [this message]
2014-08-06 23:32 ` Junio C Hamano
2014-08-06 23:51 ` Jonathan Nieder
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=20140806220832.GA12427@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).