From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Markus Klein via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Markus Klein <masmiseim@gmx.de>
Subject: Re: [PATCH v2] clone: use submodules.recurse option for automatically clone submodules
Date: Fri, 07 Feb 2020 10:17:05 -0800 [thread overview]
Message-ID: <xmqqeev645zy.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2002071621160.3718@tvgsbejvaqbjf.bet> (Johannes Schindelin's message of "Fri, 7 Feb 2020 16:45:42 +0100 (CET)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> if (!strcmp(var, "submodule.recurse")) {
>> if (git_config_bool(var, value))
>> ...
>> return 0; /* done with the variable either way */
>> }
>>
>> is more appropriate.
>
> Good catch, and I think you will have to do even more: in the "else" case,
> it is possible that the user overrode a `submodule.recurse` from the
> system config in their user-wide config, so we must _undo_ the
> `string_list_append().
Yeah, I tend to agree that submodule.recurse should not be made into
a multi-valued fields with this change; it should stay to be the
usual last-one-wins single boolean.
> Further, it is probably not a good idea to append "true" _twice_ if
> multiple configs in the chain specify `submodule.recurse = true`.
The user of this list in cmd_clone() first sorts and dedups, so
appending the same is OK, even though it may appear sloppy.
next prev parent reply other threads:[~2020-02-07 18:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 21:11 [PATCH] clone: use submodules.recurse option for automatically clone submodules Markus Klein via GitGitGadget
2020-02-01 21:19 ` Johannes Schindelin
2020-02-04 21:32 ` [PATCH v2] " Markus Klein via GitGitGadget
2020-02-05 10:37 ` Johannes Schindelin
2020-02-06 19:03 ` Junio C Hamano
2020-02-07 15:45 ` Johannes Schindelin
2020-02-07 18:17 ` Junio C Hamano [this message]
2020-02-07 18:33 ` Junio C Hamano
2020-02-24 22:19 ` AW: " masmiseim
2020-02-24 23:06 ` [PATCH v3] clone: use submodule.recurse " Markus Klein via GitGitGadget
2020-05-01 13:54 ` [PATCH v4] " Markus Klein via GitGitGadget
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqeev645zy.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=masmiseim@gmx.de \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).