git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corentin BOMPARD <corentin.bompard@etu.univ-lyon1.fr>
To: <git@vger.kernel.org>
Cc: <corentin.bompard@etu.univ-lyon1.fr>,
	<nathan.berbezier@etu.univ-lyon1.fr>,
	<pablo.chabanne@etu.univ-lyon1.fr>, <matthieu.moy@univ-lyon1.fr>
Subject: [PATCH 1/2 v3] doc/CodingGuidelines: URLs and paths as monospace.
Date: Wed, 6 Mar 2019 14:04:45 +0100	[thread overview]
Message-ID: <20190306130446.2193-1-corentin.bompard@etu.univ-lyon1.fr> (raw)

The current documentation uses both quotes (italics) and backquotes
(monospace) to render URLs and pathnames, which is inconsistant.
Document a best practice in CodingGuidelines to help reduce
inconsistencies in the futur.

We set the best practice to using backquotes, since:

* It is already an established practice. For exemple:

  $ git grep "'[^']/*[^']'" | wc -l
  206

  $ git grep '`[^`]/*[^`]`' | wc -l
  690

  There are false on both sides, but after a cursory look at the
  output of both, It doesn't seem the false positive rate is really
  higher in the second case.

  At least, this shows that the existing documentation uses
  inconsistent formatting, and that it would be good to do
  something about it.

* It may be debatable whether path names need to be typed in
  monospace but having them in italics is really unusual.

Signed-off-by: Corentin BOMPARD <corentin.bompard@etu.univ-lyon1.fr>
Signed-off-by: Nathan BERBEZIER <nathan.berbezier@etu.univ-lyon1.fr>
Signed-off-by: Pablo CHABANNE <pablo.chabanne@etu.univ-lyon1.fr>
Signed-off-by: Matthieu MOY <matthieu.moy@univ-lyon1.fr>
---
 Changes: According to Matthieu MOY we added a new guideline in
 Documentation/CodingGuidelines.txt about monospace.

 Documentation/CodingGuidelines | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 857953071..0baff9dbe 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -580,11 +580,14 @@ Writing Documentation:
  or commands:
 
  Literal examples (e.g. use of command-line options, command names,
- branch names, configuration and environment variables) must be
- typeset in monospace (i.e. wrapped with backticks):
+ branch names, URLs, pathnames (files and directories), configuration and
+ environment variables) must be typeset in monospace (i.e. wrapped with 
+ backticks):
    `--pretty=oneline`
    `git rev-list`
    `remote.pushDefault`
+   `http://git.example.com`
+   `.git/config`
    `GIT_DIR`
    `HEAD`
 
-- 
2.21.0-rc0


             reply	other threads:[~2019-03-06 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 13:04 Corentin BOMPARD [this message]
2019-03-06 13:04 ` [PATCH 2/2 v3] doc: format pathnames and URLs as monospace Corentin BOMPARD
2019-03-12 13:16   ` Matthieu Moy
2019-03-12 15:48     ` Eric Sunshine
2019-03-12 17:13       ` Andrei Rybak
2019-03-13  2:16         ` Junio C Hamano
2019-03-13  6:43           ` Eric Sunshine
2019-03-13  9:53       ` Matthieu Moy

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=20190306130446.2193-1-corentin.bompard@etu.univ-lyon1.fr \
    --to=corentin.bompard@etu.univ-lyon1.fr \
    --cc=git@vger.kernel.org \
    --cc=matthieu.moy@univ-lyon1.fr \
    --cc=nathan.berbezier@etu.univ-lyon1.fr \
    --cc=pablo.chabanne@etu.univ-lyon1.fr \
    /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.
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 NNTP newsgroup(s).