git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/7] git-ls-remote.txt: wrap shell listing in "----"

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Sep 7, 2019, 14:12 UTC
Message-ID
<93df070965c1222d5e00909ed3930dce299e1541.1567707999.git.martin.agren@gmail.com>
In-Reply-To
<cover.1567707999.git.martin.agren@gmail.com>

The second "column" in the output of `git ls-remote` is typeset differently by AsciiDoc and Asciidoctor, similar to various examples touched by the last few commits.

Fix this by marking the example shell session as a code listing by wrapping it in "----". Because this gives us some extra indentation, we can remove the one that we have been carrying explicitly. That is, drop the first tab of indentation on each line. With AsciiDoc, this results in identical rendering before and after this commit. Asciidoctor now renders this the same as AsciiDoc does.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 Documentation/git-ls-remote.txt | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 0b057cbb10..a2ea1fd687 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -92,21 +92,23 @@ OPTIONS
 EXAMPLES
 --------
 
-	$ git ls-remote --tags ./.
-	d6602ec5194c87b0fc87103ca4d67251c76f233a	refs/tags/v0.99
-	f25a265a342aed6041ab0cc484224d9ca54b6f41	refs/tags/v0.99.1
-	7ceca275d047c90c0c7d5afb13ab97efdf51bd6e	refs/tags/v0.99.3
-	c5db5456ae3b0873fc659c19fafdde22313cc441	refs/tags/v0.99.2
-	0918385dbd9656cab0d1d81ba7453d49bbc16250	refs/tags/junio-gpg-pub
-	$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
-	5fe978a5381f1fbad26a80e682ddd2a401966740	refs/heads/master
-	c781a84b5204fb294c9ccc79f8b3baceeb32c061	refs/heads/pu
-	$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
-	$ git ls-remote --tags korg v\*
-	d6602ec5194c87b0fc87103ca4d67251c76f233a	refs/tags/v0.99
-	f25a265a342aed6041ab0cc484224d9ca54b6f41	refs/tags/v0.99.1
-	c5db5456ae3b0873fc659c19fafdde22313cc441	refs/tags/v0.99.2
-	7ceca275d047c90c0c7d5afb13ab97efdf51bd6e	refs/tags/v0.99.3
+----
+$ git ls-remote --tags ./.
+d6602ec5194c87b0fc87103ca4d67251c76f233a	refs/tags/v0.99
+f25a265a342aed6041ab0cc484224d9ca54b6f41	refs/tags/v0.99.1
+7ceca275d047c90c0c7d5afb13ab97efdf51bd6e	refs/tags/v0.99.3
+c5db5456ae3b0873fc659c19fafdde22313cc441	refs/tags/v0.99.2
+0918385dbd9656cab0d1d81ba7453d49bbc16250	refs/tags/junio-gpg-pub
+$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
+5fe978a5381f1fbad26a80e682ddd2a401966740	refs/heads/master
+c781a84b5204fb294c9ccc79f8b3baceeb32c061	refs/heads/pu
+$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
+$ git ls-remote --tags korg v\*
+d6602ec5194c87b0fc87103ca4d67251c76f233a	refs/tags/v0.99
+f25a265a342aed6041ab0cc484224d9ca54b6f41	refs/tags/v0.99.1
+c5db5456ae3b0873fc659c19fafdde22313cc441	refs/tags/v0.99.2
+7ceca275d047c90c0c7d5afb13ab97efdf51bd6e	refs/tags/v0.99.3
+----
 
 SEE ALSO
 --------
-- 
2.23.0
Previous: Martin ÅgrenNext: Martin Ågren
Message 2 of 10 in “Fix more AsciiDoc/tor differences”
  1. 0/7 Fix more AsciiDoc/tor differencesMartin Ågren, Sep 7, 2019
  2. 4/7 git-ls-remote.txt: wrap shell listing in "----"Martin Ågren, Sep 7, 2019
  3. 1/7 Documentation: wrap blocks with "--"Martin Ågren, Sep 7, 2019
  4. 3/7 Documentation: wrap config listings in "----"Martin Ågren, Sep 7, 2019
  5. 2/7 git-merge-base.txt: render indentations correctly under AsciidoctorMartin Ågren, Sep 7, 2019
  6. 5/7 git-receive-pack.txt: wrap shell [script] listing in "----"Martin Ågren, Sep 7, 2019
  7. 7/7 gitweb.conf.txt: switch pluses to backticks to help AsciidoctorMartin Ågren, Sep 7, 2019
  8. 6/7 git-merge-index.txt: wrap shell listing in "----"Martin Ågren, Sep 7, 2019
  9. Jeff KingSep 13, 2019
  10. Martin ÅgrenSep 13, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.