From: Jens Lehmann <Jens.Lehmann@web.de>
To: Marc Branchaud <marcnarc@xiplink.com>
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 23:54:48 +0100 [thread overview]
Message-ID: <4D62ED38.7070408@web.de> (raw)
In-Reply-To: <4D62C385.90204@xiplink.com>
Am 21.02.2011 20:56, schrieb Marc Branchaud:
> On 11-02-21 01:30 PM, Jens Lehmann wrote:
>> Am 21.02.2011 17:13, schrieb Marc Branchaud:
> A lot of what I'm confused about is how git would distinguish between 2 things:
>
> - How the user specifies submodule recursion within a local repo.
>
> - How a repo specifies initial submodule recursion for clones.
>
> I'm happy to wait for your follow-up work to discuss this. Cloning aside,
> what you're proposing looks good to me.
Cool. When I'm done with the local repo stuff I'll continue working on the
cloning part, so stay tuned for further discussions on that topic :-)
>> But for plumbing a "respect" option
>> makes sense, using it could tell it to use the same defaults and config
>> that porcelain uses to make writing scripts easier.
>
> I haven't thought enough about plumbing to tell if it makes sense to
> configure plumbing behavior explicitly. But at first glance it seems odd...
Plumbing shouldn't care about user config by default because the aim is to
have predictable behavior. But e.g. git gui, which is using plumbing under
the hood to do the actual checkout, should honor user configuration and
porcelain defaults (because it is percieved by the user as being porcelain
itself). So git gui would benefit from being able to simply tell plumbing
"behave like you were porcelain" through an option instead of coding
recursion, user configuration and the safety checks needed before checkout
itself. And this would avoid code duplication too.
>>> * 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?
>>
>> I think the same option that controls the cloning of submodules should
>> control whether a new submodule will be populated or not. For submodules
>> that already existed despite that it might be nice to remember and respect
>> the users choice and restore it if it existed before.
>
> So, .gitmodules initially controls recursion. When a submodule gets
> populated, it gets an entry in .git/config which then determines the
> recursion behavior from then on. Changing branches might change .gitmodules,
> but anything in .git/config will persist so any customizations the user makes
> will also persist.
Yes. Upstream can give sane defaults but the user has the last word.
> Sounds good to me!
Great to hear!
next prev parent reply other threads:[~2011-02-21 22:54 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
2011-02-21 18:30 ` Jens Lehmann
2011-02-21 19:56 ` Marc Branchaud
2011-02-21 22:54 ` Jens Lehmann [this message]
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=4D62ED38.7070408@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marcnarc@xiplink.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).