diff mbox series

[v3,3/5] advice: use backticks for code

Message ID 30d662a04c75b80166db9ef94f95e8a841994fb5.1709590037.git.code@khaugsbakk.name (mailing list archive)
State Superseded
Headers show
Series advise about ref syntax rules | expand

Commit Message

Kristoffer Haugsbakk March 4, 2024, 10:07 p.m. UTC
Use backticks for quoting code rather than single quotes.

Also replace “the add command” with “`git add`”.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 Documentation/config/advice.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Junio C Hamano March 4, 2024, 11:54 p.m. UTC | #1
Kristoffer Haugsbakk <code@khaugsbakk.name> writes:

> Use backticks for quoting code rather than single quotes.

Good.  Technically it does not have to be "code", but rather what
the user would literally type from their keyboard verbatim, but
"quoting code" is so concise way to describe, it probably is good
enough hint for future developers who will find this commit via "git
blame" and read "git show" to read this explanation.

> Also replace “the add command” with “`git add`”.
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---
>  Documentation/config/advice.txt | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt
> index cfca87a6aa2..df447dd5d14 100644
> --- a/Documentation/config/advice.txt
> +++ b/Documentation/config/advice.txt
> @@ -2,14 +2,14 @@ advice.*::
>  	These variables control various optional help messages designed to
>  	aid new users.  When left unconfigured, Git will give the message
>  	alongside instructions on how to squelch it.  You can tell Git
> -	that you do not need the help message by setting these to 'false':
> +	that you do not need the help message by setting these to `false`:
>  +
>  --
>  	addEmbeddedRepo::
>  		Shown when the user accidentally adds one
>  		git repo inside of another.
>  	addEmptyPathspec::
> -		Shown when the user runs the add command without providing
> +		Shown when the user runs `git add` without providing
>  		the pathspec parameter.
>  	addIgnoredFile::
>  		Shown when the user attempts to add an ignored file to
> @@ -75,7 +75,7 @@ advice.*::
>  		non-fast-forward update to the current branch.
>  	pushNonFFMatching::
>  		Shown when the user ran linkgit:git-push[1] and pushed
> -		'matching refs' explicitly (i.e. used ':', or
> +		'matching refs' explicitly (i.e. used `:`, or
>  		specified a refspec that isn't the current branch) and
>  		it resulted in a non-fast-forward error.
>  	pushRefNeedsUpdate::
> @@ -90,9 +90,9 @@ advice.*::
>  		refs/heads/* or refs/tags/* based on the type of the
>  		source object.
>  	pushUpdateRejected::
> -		Set this variable to 'false' if you want to disable
> -		'pushNonFFCurrent', 'pushNonFFMatching', 'pushAlreadyExists',
> -		'pushFetchFirst', 'pushNeedsForce', and 'pushRefNeedsUpdate'
> +		Set this variable to `false` if you want to disable
> +		`pushNonFFCurrent`, `pushNonFFMatching`, `pushAlreadyExists`,
> +		`pushFetchFirst`, `pushNeedsForce`, and `pushRefNeedsUpdate`
>  		simultaneously.
>  	resetNoRefresh::
>  		Shown when linkgit:git-reset[1] takes more than 2
Kristoffer Haugsbakk March 5, 2024, 10:29 a.m. UTC | #2
On Tue, Mar 5, 2024, at 00:54, Junio C Hamano wrote:
>> Use backticks for quoting code rather than single quotes.
>
> Good.  Technically it does not have to be "code", but rather what
> the user would literally type from their keyboard verbatim, but
> "quoting code" is so concise way to describe, it probably is good
> enough hint for future developers who will find this commit via "git
> blame" and read "git show" to read this explanation.

I agree. Either works fine but “verbatim” is a more general term. I’ll
use that.
diff mbox series

Patch

diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt
index cfca87a6aa2..df447dd5d14 100644
--- a/Documentation/config/advice.txt
+++ b/Documentation/config/advice.txt
@@ -2,14 +2,14 @@  advice.*::
 	These variables control various optional help messages designed to
 	aid new users.  When left unconfigured, Git will give the message
 	alongside instructions on how to squelch it.  You can tell Git
-	that you do not need the help message by setting these to 'false':
+	that you do not need the help message by setting these to `false`:
 +
 --
 	addEmbeddedRepo::
 		Shown when the user accidentally adds one
 		git repo inside of another.
 	addEmptyPathspec::
-		Shown when the user runs the add command without providing
+		Shown when the user runs `git add` without providing
 		the pathspec parameter.
 	addIgnoredFile::
 		Shown when the user attempts to add an ignored file to
@@ -75,7 +75,7 @@  advice.*::
 		non-fast-forward update to the current branch.
 	pushNonFFMatching::
 		Shown when the user ran linkgit:git-push[1] and pushed
-		'matching refs' explicitly (i.e. used ':', or
+		'matching refs' explicitly (i.e. used `:`, or
 		specified a refspec that isn't the current branch) and
 		it resulted in a non-fast-forward error.
 	pushRefNeedsUpdate::
@@ -90,9 +90,9 @@  advice.*::
 		refs/heads/* or refs/tags/* based on the type of the
 		source object.
 	pushUpdateRejected::
-		Set this variable to 'false' if you want to disable
-		'pushNonFFCurrent', 'pushNonFFMatching', 'pushAlreadyExists',
-		'pushFetchFirst', 'pushNeedsForce', and 'pushRefNeedsUpdate'
+		Set this variable to `false` if you want to disable
+		`pushNonFFCurrent`, `pushNonFFMatching`, `pushAlreadyExists`,
+		`pushFetchFirst`, `pushNeedsForce`, and `pushRefNeedsUpdate`
 		simultaneously.
 	resetNoRefresh::
 		Shown when linkgit:git-reset[1] takes more than 2