From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Michael Haggerty <mhagger@alum•mit.edu>,
git@vger•kernel.org,
Johannes Schindelin <johannes.schindelin@gmx•de>
Subject: Re: [PATCH 3/3] CodingGuidelines: describe naming rules for configuration variables
Date: Sun, 01 Feb 2015 14:34:38 -0800 [thread overview]
Message-ID: <xmqqwq418dmp.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150201215729.GA19692@peff.net> (Jeff King's message of "Sun, 1 Feb 2015 16:57:30 -0500")
Jeff King <peff@peff•net> writes:
> From the user's perspective, I don't see how the implied relationships
> are significantly different. In type 1, they are placed inside a single
> value and in type 2, they are not. Both are a form of grouping.
>
> Moreover, I am not even sure that the syntax is an important element in
> communicating semantic relationships.
I think we are in agreement and I do not see how you can draw
different conclusions. The above argument refutes the point Michael
made a big deal out of, which was that "these are individual and
independent bools in the implementation detail of the code, expose
that as such to the end users." I do not buy that point, i.e. it is
not a good argument to favor style 2 over style 1, which was the
primary thing I wanted to illustrate in the message you are
responding to.
> 1. I'm a user who has set my preferred core.whitespace in my
> ~/.gitconfig. A particular project I am working on uses an
> alternate tabwidth. How do I set that in the repo config without
> repeating my defaults?
Isn't it cumulative? At least it should be (but I wouldn't be too
surprised if the recent config reader caching broke it).
> 2. I'm writing a hook whose behavior depends on the whitespace
> settings. How do I ask git whether blank-at-eol is enabled?
If that becomes an issue, "git config" would have to learn about
them, just like it knows about how to do --color depending on the
tty-ness of the output.
> 3. I'm a user who wants to set whitespace config. I prefer using "git
> config" to editing the file manually. How do I turn off
> blank-at-eol without disrupting my existing settings?
See above 1.
>> I see Peff cites "pager.<cmd>", but I think it was something that we
>> would rather shouldn't have done, similar to "alias.<cmd>". They
>> are bad precedents we shouldn't encourage new things to mimic.
>>
>> But that is not from "one-variable-with-list-is-better" (it is not
>> better for these "independent" ones) but is purely from the syntax
>> point of view.
>
> Yeah, I'd agree that the problem there is orthogonal to the type 1/2
> thing above. I don't think it has been a big deal in practice, just
> because people with good taste do not name their commands with uppercase
> anyway.
>
> I'd be happy to transition to pager.*.enabled, etc, if we care.
I have no strong opinion. It was primarily meant to illustrate why
pager.<cmd> and alias.<cmd> were bad precedents that should not be
used to support design of future things.
next prev parent reply other threads:[~2015-02-01 22:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 16:55 [PATCH] Documentation/git-add.txt: add `add.ginore-errors` configuration variable Alexander Kuleshov
2015-01-26 21:58 ` Eric Sunshine
2015-01-27 20:17 ` Junio C Hamano
2015-01-28 22:33 ` [PATCH 0/3] Documenting naming rules for configuration variables Junio C Hamano
2015-01-28 22:33 ` [PATCH 1/3] config.txt: clarify that add.ignore-errors is deprecated Junio C Hamano
2015-01-28 22:33 ` [PATCH 2/3] config.txt: mark deprecated variables more prominently Junio C Hamano
2015-01-28 22:33 ` [PATCH 3/3] CodingGuidelines: describe naming rules for configuration variables Junio C Hamano
2015-02-01 5:12 ` Michael Haggerty
2015-02-01 16:44 ` Jeff King
2015-02-01 20:18 ` Junio C Hamano
2015-02-01 21:57 ` Jeff King
2015-02-01 22:34 ` Junio C Hamano [this message]
2015-02-02 11:31 ` Johannes Schindelin
2015-02-02 18:39 ` Junio C Hamano
2015-02-02 6:47 ` Michael Haggerty
2015-02-02 18:54 ` Junio C Hamano
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=xmqqwq418dmp.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=johannes.schindelin@gmx$(echo .)de \
--cc=mhagger@alum$(echo .)mit.edu \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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