threads / patch / 52837

patchdoc/config/push: use longer "--" line for preformatted example

Subject: [PATCH] doc/config/push: use longer "--" line for preformatted example

## tl;dr

2 messages between Feb 18, 2020 and Feb 18, 2020. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Jeff King· Feb 18, 2020, 21:25 UTC · lore

The example for the push.pushOption config tries to create a preformatted section, but uses only two dashes in its "--" line. In AsciiDoc this is an "open block", with no type; the lines end up jumbled because they're formatted as paragraphs. We need four or more dashes to make it a "listing block" that will respect the linebreaks.

Signed-off-by: Jeff King <peff@peff.net>
---
I noticed this as part our other discussion. The rendered output of
"./doc-diff HEAD^ HEAD" is:
  @@ -4143,15 +4143,20 @@ CONFIGURATION FILE
              repository) to clear the values inherited from a lower priority
              configuration files (e.g.  $HOME/.gitconfig).
   
  -           Example:
  +               Example:
   
  -           /etc/gitconfig push.pushoption = a push.pushoption = b
  +               /etc/gitconfig
  +                 push.pushoption = a
  +                 push.pushoption = b
   
  -           ~/.gitconfig push.pushoption = c
  +               ~/.gitconfig
  +                 push.pushoption = c
   
  -           repo/.git/config push.pushoption = push.pushoption = b
  +               repo/.git/config
  +                 push.pushoption =
  +                 push.pushoption = b
   
  -           This will result in only b (a and c are cleared).
  +               This will result in only b (a and c are cleared).
   
          push.recurseSubmodules
              Make sure all submodule commits used by the revisions to be pushed
 Documentation/config/push.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Show changes to Documentation/config/push.txt +2 −0
diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
index 54871f8213..0a7aa322a9 100644
--- a/Documentation/config/push.txt
+++ b/Documentation/config/push.txt
@@ -80,7 +80,7 @@ higher priority configuration file (e.g. `.git/config` in a
 repository) to clear the values inherited from a lower priority
 configuration files (e.g. `$HOME/.gitconfig`).
 +
---
+----
 
 Example:
 
@@ -97,7 +97,7 @@ repo/.git/config
 
 This will result in only b (a and c are cleared).
 
---
+----
 
 push.recurseSubmodules::
 	Make sure all submodule commits used by the revisions to be pushed
-- 
2.25.1.795.g3fd338b409
Junio C Hamano· Feb 18, 2020, 21:47 UTC · re: Jeff King · lore

Re: [PATCH] doc/config/push: use longer "--" line for preformatted example

Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> The example for the push.pushOption config tries to create a
> preformatted section, but uses only two dashes in its "--" line. In
> AsciiDoc this is an "open block", with no type; the lines end up jumbled
> because they're formatted as paragraphs. We need four or more dashes to
> make it a "listing block" that will respect the linebreaks.

And the itemized list in push.default is delimited with two dashes as a non listing block, so it is shown correctly as a bulletted list just fine. Makes sense.

Will queue.

← back to recent threads