summaryrefslogtreecommitdiff
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorTom Russello <tom.russello@grenoble-inp.org>2016-06-07 22:35:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-08 19:04:37 (GMT)
commit41f5b21f84b4d7db8e8c6edb34682c0f840ad8c8 (patch)
tree6200dbb6a10c67a974c12537dcac1a8f3896744d /Documentation/CodingGuidelines
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
downloadgit-41f5b21f84b4d7db8e8c6edb34682c0f840ad8c8.zip
git-41f5b21f84b4d7db8e8c6edb34682c0f840ad8c8.tar.gz
git-41f5b21f84b4d7db8e8c6edb34682c0f840ad8c8.tar.bz2
doc: clearer rule about formatting literals
Make the guideline text that we want for our documentation clearer. Signed-off-by: Tom Russello <tom.russello@grenoble-inp.org> Signed-off-by: Erwan Mathoniere <erwan.mathoniere@grenoble-inp.org> Signed-off-by: Samuel Groot <samuel.groot@grenoble-inp.org> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines13
1 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 0ddd368..7f4769a 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -526,12 +526,19 @@ Writing Documentation:
modifying paragraphs or option/command explanations that contain options
or commands:
- Literal examples (e.g. use of command-line options, command names, and
- configuration variables) are typeset in monospace, and if you can use
- `backticks around word phrases`, do so.
+ 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`
+
+ An environment variable must be prefixed with "$" only when referring to its
+ value and not when referring to the variable itself, in this case there is
+ nothing to add except the backticks:
+ `GIT_DIR` is specified
+ `$GIT_DIR/hooks/pre-receive`
Word phrases enclosed in `backtick characters` are rendered literally
and will not be further expanded. The use of `backticks` to achieve the