[PATCH 4/6] diff-options.txt: move monospace markup out of attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



git-log.txt and git-show.txt want to use different defaults for the
`--no-diff-merges` option. They do this by defining a
"diff-merges-default" attribute as, e.g., `off` (with backticks), which
is then referenced in the common diff-options.txt.

AsciiDoc renders the default in monospace, as wanted, but Asciidoctor
renders the backticks literally.

Pull the formatting into diff-options.txt and define
"diff-merges-default" without any quotation or markup. We can't write
`{diff-merges-default)` with backticks since that would render as
"{diff-merges-default}", but we can use +{diff-merges-default}+ -- both
Asciidoc and Asciidoctor do the substitution and the parsing of the
plusses in the order we want.

Signed-off-by: Martin Ågren <martin.agren@xxxxxxxxx>
---
 Documentation/diff-options.txt | 2 +-
 Documentation/git-log.txt      | 2 +-
 Documentation/git-show.txt     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 530d115914..6eb8bfff5d 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -37,7 +37,7 @@ ifdef::git-log[]
 --diff-merges=(off|none|on|first-parent|1|separate|m|combined|c|dense-combined|cc)::
 --no-diff-merges::
 	Specify diff format to be used for merge commits. Default is
-	{diff-merges-default} unless `--first-parent` is in use, in which case
+	+{diff-merges-default}+ unless `--first-parent` is in use, in which case
 	`first-parent` is the default.
 +
 --diff-merges=(off|none):::
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 1bbf865a1b..19560650bf 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -115,7 +115,7 @@ is when `--first-parent` is in use, in which case `first-parent` is
 the default format.
 
 :git-log: 1
-:diff-merges-default: `off`
+:diff-merges-default: off
 include::diff-options.txt[]
 
 include::diff-generate-patch.txt[]
diff --git a/Documentation/git-show.txt b/Documentation/git-show.txt
index 2b1bc7288d..f8341e51c0 100644
--- a/Documentation/git-show.txt
+++ b/Documentation/git-show.txt
@@ -51,7 +51,7 @@ The options below can be used to change the way `git show` generates
 diff output.
 
 :git-log: 1
-:diff-merges-default: `dense-combined`
+:diff-merges-default: dense-combined
 include::diff-options.txt[]
 
 include::diff-generate-patch.txt[]
-- 
2.31.1.751.gd2f1c929bd




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux