Skip to content

Commit

Permalink
git-submodule documentation: fix foreach example
Browse files Browse the repository at this point in the history
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 <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Miklos Vajna authored and Junio C Hamano committed Jun 30, 2009
1 parent 1bed73c commit 1c3acfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Documentation/asciidoc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ caret=&#94;
startsb=&#91;
endsb=&#93;
tilde=&#126;
backtick=&#96;

ifdef::backend-docbook[]
[linkgit-inlinemacro]
Expand Down
5 changes: 3 additions & 2 deletions Documentation/git-submodule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,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 {backtick}git
rev-parse HEAD{backtick}'+ will show the path and currently checked out
commit for each submodule.

sync::
Synchronizes submodules' remote URL configuration setting
Expand Down

0 comments on commit 1c3acfc

Please sign in to comment.