git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Tom Russello <tom.russello@grenoble-inp.org>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git@vger.kernel.org, gitster@pobox.com,
	erwan.mathoniere@grenoble-inp.org, samuel.groot@grenoble-inp.org,
	jordan.de-gea@grenoble-inp.org
Subject: Re: [PATCH v3 1/3] doc: clearer rule about formatting literals
Date: Mon, 6 Jun 2016 17:38:09 +0200	[thread overview]
Message-ID: <c31c7d1c-fac9-45f6-b53c-842cab16eacb@grenoble-inp.org> (raw)
In-Reply-To: <vpq8tyio2lu.fsf@anie.imag.fr>

On 06/06/16 15:42, Matthieu Moy wrote:
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> 
>> Tom Russello <tom.russello@grenoble-inp.org> writes:
>>> + Literal examples (e.g. use of command-line options, command names,
>>> + configuration and environment variables) must be typeset in monospace (i.e.
>>> + wrapped with backticks):
>>>     `--pretty=oneline`
>>>     `git rev-list`
>>>     `remote.pushDefault`
>>> +   `GIT_DIR`
>>
>> Don't you want `$GIT_DIR` here?

No, I didn't as we can find both of them in the documentation and
because there is no guideline about this.

> Actually, not really. The use (which seems rather consistant) is to say
> "The `GIT_...` environment variable" when referring to the variable, and
> to use $GIT_... when referring to its value, like in "`$GIT_DIR/hooks`
> directory".

I think this is the more intuitive solution as well.

> It makes sense since not all systems use $ (AFAIK, Windows uses
> %variable% where POSIX uses $variable), so it's best to use a neutral
> syntax when possible. OTOH, writting `GIT_DIR/hooks` without the $ would
> be really confusing as one could read it as the literal string
> `GIT_DIR`.
> 
> I think this rule (when to use $ and when not to use it) deserves to be
> clarified here too.

Ok, I add this to the CodingGuidelines file.

  reply	other threads:[~2016-06-06 15:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18 15:58 [RFC/PATCH] Formatting variables in the documentation Tom Russello
2016-05-18 18:15 ` Jeff King
2016-05-23 16:00   ` Samuel GROOT
2016-05-23 17:57     ` Matthieu Moy
2016-05-26  4:36       ` Jeff King
2016-05-26 16:18         ` Junio C Hamano
2016-05-26 16:23           ` Jeff King
2016-05-26 16:37             ` Junio C Hamano
2016-05-26 16:39               ` Jeff King
2016-05-31 16:20               ` [PATCH] Documentation: bold literals in man Erwan Mathoniere
2016-06-03 22:08 ` [PATCH v2] Documentation more consistent Tom Russello
2016-06-03 22:08   ` [PATCH v2 1/3] Clearer rule about formatting literals Tom Russello
2016-06-03 22:08   ` [PATCH v2 2/3] Change environment variables format Tom Russello
2016-06-03 22:08   ` [PATCH v2 3/3] Change configuration " Tom Russello
2016-06-03 22:42   ` [PATCH v2] Documentation more consistent Junio C Hamano
2016-06-06 10:09   ` [PATCH v3] " Tom Russello
2016-06-06 10:09     ` [PATCH v3 1/3] doc: clearer rule about formatting literals Tom Russello
2016-06-06 13:36       ` Matthieu Moy
2016-06-06 13:42         ` Matthieu Moy
2016-06-06 15:38           ` Tom Russello [this message]
2016-06-06 10:09     ` [PATCH v3 2/3] doc: change environment variables format Tom Russello
2016-06-06 14:08       ` Matthieu Moy
2016-06-06 16:34         ` Tom Russello
2016-06-06 10:09     ` [PATCH v3 3/3] doc: change configuration " Tom Russello
2016-06-06 14:09       ` Matthieu Moy
2016-06-07 22:35     ` [PATCH v4 0/3] Documentation more consistent Tom Russello
2016-06-07 22:35       ` [PATCH v4 1/3] doc: clearer rule about formatting literals Tom Russello
2016-06-07 22:35       ` [PATCH v4 2/3] doc: change environment variables format Tom Russello
2016-06-07 22:35       ` [PATCH v4 3/3] doc: more consistency in " Tom Russello
2016-06-08  6:26         ` Matthieu Moy
2016-06-08 17:27           ` Tom Russello
2016-06-08  6:56         ` Johannes Sixt
2016-06-08  8:12           ` Matthieu Moy
2016-06-08 17:23       ` [PATCH v4 4/3] doc: change configuration " Tom Russello

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=c31c7d1c-fac9-45f6-b53c-842cab16eacb@grenoble-inp.org \
    --to=tom.russello@grenoble-inp.org \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=erwan.mathoniere@grenoble-inp.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jordan.de-gea@grenoble-inp.org \
    --cc=samuel.groot@grenoble-inp.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.
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).