From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Stefan Beller <sbeller@google.com>
Subject: Re: [PATCH 1/4] config doc: move color.ui documentation to one place
Date: Thu, 31 May 2018 09:09:58 +0200 [thread overview]
Message-ID: <87in749u7t.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <20180531052538.GB17068@sigill.intra.peff.net>
On Thu, May 31 2018, Jeff King wrote:
> On Wed, May 30, 2018 at 09:06:38PM +0000, Ævar Arnfjörð Bjarmason wrote:
>
>> Ever since b982592d66 ("git-status: document colorization config
>> options", 2006-09-11) we've slowly been accumulating more and more
>> color.* options, where the documentation for each new one has
>> seemingly been copy/pasted with minor adjustments from the last.
>>
>> This has resulted in documentation where we're describing what sort of
>> values color.ui or its overriding variables can take a grand total of
>> 9 times.
>
> Yeah, I agree the current state is poor.
>
>> This makes for hard and tedious reading, and is going to be a royal
>> pain if we're ever going to add more color.ui values.
>>
>> Instead let's briefly describe what each variable is for, and then
>> copy/paste a new boilerplate saying that this variable takes the exact
>> same values as color.ui, and if it's unset it'll fallback to whatever
>> color.ui is set to.
>
> Definitely an improvement. Though I wonder if we should go further and
> show the user the relationship in the documentation explicitly. Like:
>
> color.<system>::
> A boolean to enable/disable color in a particular part of Git,
> overriding `color.ui` (see `color.ui` for possible values). The
> current set of systems is:
>
> advice::
> Hints shown with the "hint:" prefix, controlled by
> `advice.*` config.
>
> branch::
> Output from the linkgit:git-branch[1] command.
>
> ...etc...
>
> We could possibly do the same with color.<system>.<slot>. Or maybe even
> make a single hierarchical list of systems, and then the color slots
> under each. I think if our mental model in adding these options is
> to have this kind of hierarchy, then it makes sense to communicate it
> explicitly to the user and get them using the same mental model.
I wouldn't be opposed to some twist on that, but I really dislike the
variables that are documented in such a way that you can't find them in
the documentation by searching for their fully qualified name.
next prev parent reply other threads:[~2018-05-31 7:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 21:06 [PATCH 0/4] color.ui docs & add color.ui=isatty Ævar Arnfjörð Bjarmason
2018-05-30 21:06 ` [PATCH 1/4] config doc: move color.ui documentation to one place Ævar Arnfjörð Bjarmason
2018-05-31 5:25 ` Jeff King
2018-05-31 7:09 ` Ævar Arnfjörð Bjarmason [this message]
2018-06-01 5:31 ` Jeff King
2018-05-30 21:06 ` [PATCH 2/4] config doc: clarify "to a terminal" in color.ui Ævar Arnfjörð Bjarmason
2018-05-31 5:27 ` Jeff King
2018-05-30 21:06 ` [RFC PATCH 3/4] color.ui config: don't die on unknown values Ævar Arnfjörð Bjarmason
2018-05-30 22:32 ` Stefan Beller
2018-05-30 23:05 ` Junio C Hamano
2018-05-31 7:17 ` Ævar Arnfjörð Bjarmason
2018-06-01 5:53 ` Jeff King
2018-05-30 21:06 ` [RFC PATCH 4/4] color.ui config: add "isatty" setting Ævar Arnfjörð Bjarmason
2018-05-30 22:57 ` Junio C Hamano
2018-05-31 7:07 ` Ævar Arnfjörð Bjarmason
2018-05-31 5:38 ` Jeff King
2018-05-31 7:01 ` Ævar Arnfjörð Bjarmason
2018-06-01 5:30 ` Jeff King
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=87in749u7t.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=peff@peff.net \
--cc=sbeller@google.com \
/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).