From: Marc Branchaud <marcnarc@xiplink.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [1.8.0] Recursively checkout, merge and reset populated submodules
Date: Mon, 21 Feb 2011 11:13:21 -0500 [thread overview]
Message-ID: <4D628F21.3050808@xiplink.com> (raw)
In-Reply-To: <4D5FF6E7.8090104@web.de>
On 11-02-19 11:59 AM, Jens Lehmann wrote:
> Proposal:
> When switching branches, merging or resetting the work tree of
> populated submodules should be checked out too according to the
> commit recorded in the superproject. Make this the default for
> porcelain and optional for plumbing.
>
> The same safety precautions that are used for files in the
> superproject apply to the changes present in the submodules,
> no local modifications may be overwritten unless -f is used.
> When the "update" config option is set to "merge" or "rebase"
> the submodule will be left unchanged.
>
> The "update" config option will learn a new value "none" to let
> the user turn off this behavior for single submodules. A global
> config option and the command line parameter "--recurse-submodules"
> will also be added. This change will remove the need to call "git
> submodule update" for all populated submodules (except those who
> use the "update=merge" or "update=rebase" configuration settings).
A big +1 from me for all the submodule work -- thanks Jens!
Could you clarify the proposal a bit? A few questions occurred to me as I
read it:
* How is the initial set of populated submodules set up during a clone
operation? Specifically, how would the origin repo specify which submodules
to recursively clone? (My understanding is that the origin's .gitmodules
file, as it exists in whatever branch is being cloned, would specify
submodule.<name>.update values, and those would drive the recursion.)
* Which values of submodule.<name>.update would enable/disable recursion
during a clone? Would just "checkout" enable it, or should "merge" and
"rebase" also trigger recursion when cloning?
* What happens when a clone's user manually populates one of the other
submodules that wasn't part of the initial set? Automatic recursion into
this newly-populated submodule is controlled by the setting of the global
recurse-submodules option, right?
* What are the possible values of the global recurse-submodules option?
Here's what I came up with:
all -- Always recurse
populated -- Only recurse into *all* currently-populated submodules
respect -- Respect each submodule's "update" option (better name?)
none -- Never recurse
* What will happen when I start checked out at commit A, with a populated
submodule, then check out commit B where that submodule doesn't exist, then
return to commit A? How will whatever recursion settings I had at the start
be preserved?
M.
next prev parent reply other threads:[~2011-02-21 16:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 1:02 [1.8.0] Summary of the discussions Junio C Hamano
2011-02-18 2:08 ` Martin von Zweigbergk
2011-02-19 16:40 ` [1.7.5] Let fetch and pull recurse into submodules when new commits are recorded Jens Lehmann
2011-02-21 15:12 ` Marc Branchaud
2011-02-21 17:38 ` Jens Lehmann
2011-02-19 16:59 ` [1.8.0] Recursively checkout, merge and reset populated submodules Jens Lehmann
2011-02-20 6:49 ` Junio C Hamano
2011-02-21 16:13 ` Marc Branchaud [this message]
2011-02-21 18:30 ` Jens Lehmann
2011-02-21 19:56 ` Marc Branchaud
2011-02-21 22:54 ` Jens Lehmann
2011-02-22 0:51 ` Miles Bader
2011-02-22 2:32 ` Phil Hord
2011-02-22 8:11 ` Jens Lehmann
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=4D628F21.3050808@xiplink.com \
--to=marcnarc@xiplink.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).