From: Jens Lehmann <Jens.Lehmann@web.de>
To: Junio C Hamano <gitster@pobox.com>, Michal Sojka <sojkam1@fel.cvut.cz>
Cc: git@vger.kernel.org, Heiko Voigt <hvoigt@hvoigt.net>
Subject: Re: [PATCH] submodule: Fix documentation of update subcommand
Date: Tue, 04 Nov 2014 21:22:10 +0100 [thread overview]
Message-ID: <54593572.3080805@web.de> (raw)
In-Reply-To: <xmqq7fzbriew.fsf@gitster.dls.corp.google.com>
Am 04.11.2014 um 00:08 schrieb Junio C Hamano:
> Michal Sojka <sojkam1@fel.cvut.cz> writes:
>>> Or something perhaps? Or the detailed description of
>>> submodule.$name.update should be dropped from here and refer the
>>> reader to config.txt instead?
>>
>> I guess you mean gitmodules.txt.
>
> Actually, I do mean the configuration. .gitmodules is just a
> template to help the user populate .git/config, and the latter of
> which should be the sole source of truth. This is an important
> principle, and it becomes even more important once we start talking
> about security sensitive possiblity like allowing !command as the
> value.
Not quite. You're definitely right about the !command value for
the 'update' setting; this should never be taken from .gitmodules
but only from .git/config. But apart from that following this
principle would hurt submodule users a lot. The only thing that
should be set in stone in .git/config is the 'url' setting,
because an older url might not even exist anmore. But e.g. the
'branch' setting must be taken from .gitmodules. Otherwise we
could not change it on a per-superproject-branch basis. And if
the 'path' setting would only be taken from .git/config instead
of .gitmodules, we wouldn't even be able to rename submodules
(which is exactly what this setting was added for in the first
place). The same applies to 'ignore' and 'fetch'.
So I believe that gitmodules.txt should describe all ćonfig
options that can be provided by upstream (and e.g. mention that
the 'url' and 'update' values are copied into .git/config on
init), while all settings that can be overridden locally should
be documented in config.txt (which will be a subset of those
documented in gitmodules.txt).
>> The `!command` form is not documented in gitmodules.txt. Maybe it would
>> be best to fully document .update in gitmodules.txt and just refer to
>> there. Having documentation at two places seems to be confusing not only
>> for users, but also for those who send patches :)
>>
>> I'm no longer able to formulate my proposal properly as a patch tonight,
>> but if needed I'll try it later.
>
> That is fine. People have lived with the current text for more than
> two years without problems, so we are obviously not in a hurry.
Yup.
next prev parent reply other threads:[~2014-11-04 20:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 10:09 [PATCH] submodule: Fix documentation of update subcommand Michal Sojka
2014-11-03 19:02 ` Junio C Hamano
2014-11-03 20:38 ` Jens Lehmann
2014-11-03 21:35 ` Junio C Hamano
2014-11-03 22:55 ` Michal Sojka
2014-11-03 23:08 ` Junio C Hamano
2014-11-04 20:22 ` Jens Lehmann [this message]
2014-11-04 20:56 ` Junio C Hamano
2014-11-03 20:53 ` Junio C Hamano
2014-11-03 20:58 ` Jens Lehmann
2015-02-17 22:45 ` Junio C Hamano
2015-02-18 22:48 ` [PATCH v2] " Michal Sojka
2015-02-18 23:44 ` Junio C Hamano
2015-02-19 17:54 ` Michal Sojka
2015-02-19 18:52 ` [PATCH v3] submodule: Improve " Michal Sojka
2015-02-20 23:31 ` Junio C Hamano
2015-02-23 13:31 ` Michal Sojka
2015-02-23 13:32 ` [PATCH] " Michal Sojka
2015-02-23 20:13 ` Junio C Hamano
2015-02-23 20:25 ` Junio C Hamano
2015-03-02 22:39 ` Michal Sojka
2015-03-02 22:42 ` [PATCH v5] " Michal Sojka
2015-03-02 22:57 ` [PATCH v6] " Michal Sojka
2015-03-02 23:05 ` Junio C Hamano
2014-11-03 21:15 ` [PATCH] submodule: Fix " Michal Sojka
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=54593572.3080805@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hvoigt@hvoigt.net \
--cc=sojkam1@fel.cvut.cz \
/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).