From: Junio C Hamano <gitster@pobox.com>
To: Francesco Pretto <ceztko@gmail.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] git-submodule.sh: Support 'checkout' as a valid update command
Date: Tue, 07 Jan 2014 08:12:31 -0800 [thread overview]
Message-ID: <xmqqlhyrg49c.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CALas-ijrD1VnyUcr2yQw_1Je4K3eEdXtxqDNDKdGPZE=1=Nm3A@mail.gmail.com> (Francesco Pretto's message of "Tue, 7 Jan 2014 01:05:04 +0100")
Francesco Pretto <ceztko@gmail.com> writes:
> Like you said, "it already refers to checkout and handles it
> correctly". I think the use of the simple present tense here is
> correct: it's a fact. Feel free to advice another wording if you
> prefer.
It is not about preference but what we want to convey to the
readers. When you start the sentence with "Oh, it already works
correctly", the readers need to see this sentence finished: "It
already works, it is handled correctly, but we change the code
nevertheless because ...?".
Here is my attempt to fill that "because ..." part:
Subject: git-submodule.sh: 'checkout' is a valid update mode
'checkout' is documented as one of the valid values for
'submodule.<name>.update' variable, and in a repository with
the variable set to 'checkout', "git submodule update"
command do update using the 'checkout' mode.
However, it has been an accident that the implementation
works this way; any unknown value would trigger the same
codepath and update using the 'checkout' mode.
Tighten the codepath and explicitly list 'checkout' as one
of the known update modes, and error out when an unknown
update mode is used.
Also, teach the codepath that initializes the configuration
variable from in-tree .gitmodules that 'checkout' is one of
the valid values---the code since ac1fbbda (submodule: do
not copy unknown update mode from .gitmodules, 2013-12-02)
used to treat the value 'checkout' as unknown and mapped it
to 'none', which made little sense.
next prev parent reply other threads:[~2014-01-07 16:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 18:58 [PATCH] git-submodule.sh: Support 'checkout' as a valid update command Francesco Pretto
2014-01-06 23:48 ` Junio C Hamano
2014-01-07 0:05 ` Francesco Pretto
2014-01-07 16:12 ` Junio C Hamano [this message]
2014-01-07 17:42 ` Francesco Pretto
2014-01-07 1:16 ` Francesco Pretto
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=xmqqlhyrg49c.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=ceztko@gmail.com \
--cc=git@vger.kernel.org \
/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).