From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
git@vger.kernel.org, bert.wesarg@googlemail.com
Subject: Re: [PATCH v2 1/3] config: prepare to pass more info in git_config_with_options()
Date: Mon, 17 Apr 2017 21:51:42 -0700 [thread overview]
Message-ID: <xmqqr30qe2sh.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170418035509.6zd4kxtfggei5yaj@sigill.intra.peff.net> (Jeff King's message of "Mon, 17 Apr 2017 23:55:10 -0400")
Jeff King <peff@peff.net> writes:
> On Mon, Apr 17, 2017 at 07:27:16PM -0700, Junio C Hamano wrote:
>
>> > @@ -81,7 +82,7 @@ static struct option builtin_config_options[] = {
>> > OPT_GROUP(N_("Other")),
>> > OPT_BOOL('z', "null", &end_null, N_("terminate values with NUL byte")),
>> > OPT_BOOL(0, "name-only", &omit_values, N_("show variable names only")),
>> > - OPT_BOOL(0, "includes", &respect_includes, N_("respect include directives on lookup")),
>> > + OPT_BOOL(0, "includes", &respect_includes_opt, N_("respect include directives on lookup")),
>>
>> It would be more in line with what the log message advertised if you
>> did
>>
>> static struct config_options config_options = {
>> -1, /* .respect_includes: unspecified */
>> };
>>
>> OPT_BOOL(0, "includes", &config_options.respect_includes, N_("...")),
>>
>> no?
>
> I think I like the split between the option-value here and the "final"
> value that goes into config_options.respect_includes. Because we
> actually munge it later based on the given-config value anyway.
>
> So I agree this makes the diff larger than it might need to be, but I
> think the end result is a bit nicer.
Yeah, I didn't see the end result was a single bit (unsigned :1).
This separation is OK.
next prev parent reply other threads:[~2017-04-18 4:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 17:04 includeIf breaks calling dashed externals Bert Wesarg
2017-04-14 17:43 ` Jeff King
2017-04-15 11:49 ` Duy Nguyen
2017-04-16 4:50 ` Jeff King
2017-04-16 10:41 ` [PATCH 1/2] config: prepare to pass more info in git_config_with_options() Nguyễn Thái Ngọc Duy
2017-04-16 10:41 ` [PATCH 2/2] config: handle conditional include when $GIT_DIR is not set up Nguyễn Thái Ngọc Duy
2017-04-16 15:51 ` Jeff King
2017-04-17 2:13 ` Duy Nguyen
2017-04-18 3:56 ` Jeff King
2017-04-17 10:07 ` Duy Nguyen
2017-04-17 10:10 ` [PATCH v2 1/3] config: prepare to pass more info in git_config_with_options() Nguyễn Thái Ngọc Duy
2017-04-17 10:10 ` [PATCH v2 2/3] config: handle conditional include when $GIT_DIR is not set up Nguyễn Thái Ngọc Duy
2017-04-18 2:49 ` Junio C Hamano
2017-04-18 2:56 ` Junio C Hamano
2017-04-18 3:46 ` Jeff King
2017-04-17 10:10 ` [PATCH v2 3/3] config: correct file reading order in read_early_config() Nguyễn Thái Ngọc Duy
2017-04-18 3:53 ` Jeff King
2017-04-18 2:27 ` [PATCH v2 1/3] config: prepare to pass more info in git_config_with_options() Junio C Hamano
2017-04-18 3:55 ` Jeff King
2017-04-18 4:51 ` Junio C Hamano [this message]
2017-04-18 3:17 ` [PATCH 2/2] config: handle conditional include when $GIT_DIR is not set up Junio C Hamano
2017-04-18 4:03 ` Jeff King
2017-04-16 15:31 ` [PATCH 1/2] config: prepare to pass more info in git_config_with_options() Jeff King
2017-04-17 1:42 ` Duy Nguyen
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=xmqqr30qe2sh.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/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).