From: Jonathan Nieder <jrnieder@gmail.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>,
Kevin Ballard <kevin@sb.org>, Jon Seymour <jon.seymour@gmail.com>,
Chris Packham <judge.packham@gmail.com>,
Marc Branchaud <marcnarc@xiplink.com>
Subject: Re: [PATCH v3 2/3] Add the 'fetch.recurseSubmodules' config setting
Date: Fri, 12 Nov 2010 09:52:10 -0600 [thread overview]
Message-ID: <20101112155210.GA15141@burratino> (raw)
In-Reply-To: <4CDD2AF9.6040403@web.de>
Jens Lehmann wrote:
> Am 11.11.2010 20:00, schrieb Jonathan Nieder:
>> Yes, that makes some sense to me. Except wouldn't it be a single
>> configuration item? "These submodules should be checked out in all
>> but unusual situations, so check them out automatically and keep them
>> updated."
>
> Hmm, but we have at least three modes of how to update them:
>
> 1) Never fetch the submodule (to get new commits the user has to run
> "git fetch --recurse-submodules" by hand)
>
> 2) Fetch the submodule each time you fetch the superproject (Which is
> really handy when you do development in the submodule too but can
> be really inconvenient when you don't)
>
> 3) Update submodules only when new recorded commits are fetched in
> the superproject (This mode is not added with the current patch
> series but will be in one of the next)
>
> So you would need a config option for that anyway, no? And that is why
> I'd rather like to have a separate fetch option to control that behavior
> instead of an implicit "if-it's-to-be-checked-out-fetch-it-too" approach.
I still think I am missing something.
Traditionally, git has been a _content_ tracker. The configuration that
gets transmitted (.gitignore, .gitattributes, .gitmodules) would only
represent basic information needed for that content to remain usable and
sensible.
In the case of .gitmodules, it seems that two concepts are being
conflated:
A. Configuration based on the user's preferences. Absolutely, a person
deserves to be able to easily choose between (1), (2), and (3) as
described above.
B. Metadata about the content that should be shared. For example, "this
submodule would be checked out in all but unusual circumstances" is a
useful thing to be able to declare.
Probably I am missing something big, but fetchsubmodules as currently
defined seem like something in category A and not in category B.
Partially because if we ever implement option (3), that is what almost
_every_ casual consumer will want. So why should they be stuck with these
configuration files specifying (1) and (2) when they check out old
revisions?
All that said, I do not think it is unreasonable in some situations for a
project to want to share configuration of type (A) between members of a
project; for example, lots of projects share hooks and that's great. I
just don't think git should set it up automatically --- better to require
an explicit user action like "sh useprojectconfiguration.sh" (an action
more explicit than "please initialize and checkout all relevant
submodules") for such cases.
Hoping that is clearer,
Jonathan
next prev parent reply other threads:[~2010-11-12 15:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 23:53 [PATCH v3 0/3] Teach fetch and pull to recursively fetch submodules Jens Lehmann
2010-11-10 23:54 ` [PATCH v3 1/3] fetch/pull: Add the --recurse-submodules option Jens Lehmann
2010-11-10 23:55 ` [PATCH v3 2/3] Add the 'fetch.recurseSubmodules' config setting Jens Lehmann
2010-11-11 0:02 ` Jonathan Nieder
2010-11-11 8:14 ` Jens Lehmann
2010-11-11 8:27 ` Jonathan Nieder
2010-11-11 18:31 ` Junio C Hamano
2010-11-11 19:00 ` Jonathan Nieder
2010-11-12 11:54 ` Jens Lehmann
2010-11-12 15:52 ` Jonathan Nieder [this message]
2010-11-12 19:48 ` Jens Lehmann
2010-11-12 20:16 ` Jonathan Nieder
2010-11-12 21:58 ` Jens Lehmann
2010-11-12 11:40 ` Jens Lehmann
2010-11-10 23:55 ` [PATCH v3 3/3] Submodules: Add the "fetchRecurseSubmodules" config option Jens Lehmann
2010-11-11 0:05 ` [PATCH v3 0/3] Teach fetch and pull to recursively fetch submodules Jonathan Nieder
2010-11-11 8:18 ` Jens Lehmann
2010-11-12 12:54 ` [PATCH v4 1/3] fetch/pull: Add the --recurse-submodules option Jens Lehmann
2010-11-12 19:54 ` Jonathan Nieder
2010-11-12 20:22 ` Jens Lehmann
2010-12-09 21:16 ` Junio C Hamano
2010-12-09 23:07 ` Jens Lehmann
2010-12-10 17:30 ` Junio C Hamano
2010-12-10 18:03 ` 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=20101112155210.GA15141@burratino \
--to=jrnieder@gmail.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jon.seymour@gmail.com \
--cc=judge.packham@gmail.com \
--cc=kevin@sb.org \
--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).