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

[PATCH] git-submodule documentation: fix foreach example

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Jun 28, 2009, 11:39 UTC
Message-ID
<20090628113931.GC10895@genesis.frugalware.org>

Backstick and apostrophe are asciidoc markup, so they should be escaped in order to get the expected result in the rendered manual page.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 Documentation/asciidoc.conf     |    1 +
 Documentation/git-submodule.txt |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index dc76e7f..b88d875 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -17,6 +17,7 @@ caret=&#94;
 startsb=&#91;
 endsb=&#93;
 tilde=&#126;
+backstick=&#96;
 
 ifdef::backend-docbook[]
 [linkgit-inlinemacro]
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 470bd75..8941ad7 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -141,8 +141,9 @@ foreach::
 	the processing to terminate. This can be overridden by adding '|| :'
 	to the end of the command.
 +
-As an example, "git submodule foreach 'echo $path `git rev-parse HEAD`' will
-show the path and currently checked out commit for each submodule.
+As an example, +git submodule foreach \'echo $path {backstick}git
+rev-parse HEAD{backstick}'+ will show the path and currently checked out
+commit for each submodule.
 
 sync::
 	Synchronizes submodules' remote URL configuration setting
-- 
1.6.3.2
Next: Jakub Narebski
Message 1 of 3 in “git-submodule documentation: fix foreach example”
  1. git-submodule documentation: fix foreach exampleMiklos Vajna, Jun 28, 2009
  2. Jakub NarebskiJun 28, 2009
  3. git-submodule documentation: fix foreach exampleMiklos Vajna, Jun 28, 2009

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.