Skip to content

Commit 1c3acfc

Browse files
Miklos Vajnagitster
authored andcommitted
git-submodule documentation: fix foreach example
Backtick 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1bed73c commit 1c3acfc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Documentation/asciidoc.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ caret=&#94;
1717
startsb=&#91;
1818
endsb=&#93;
1919
tilde=&#126;
20+
backtick=&#96;
2021

2122
ifdef::backend-docbook[]
2223
[linkgit-inlinemacro]

Documentation/git-submodule.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ foreach::
137137
the processing to terminate. This can be overridden by adding '|| :'
138138
to the end of the command.
139139
+
140-
As an example, "git submodule foreach 'echo $path `git rev-parse HEAD`' will
141-
show the path and currently checked out commit for each submodule.
140+
As an example, +git submodule foreach \'echo $path {backtick}git
141+
rev-parse HEAD{backtick}'+ will show the path and currently checked out
142+
commit for each submodule.
142143

143144
sync::
144145
Synchronizes submodules' remote URL configuration setting

0 commit comments

Comments
 (0)