summaryrefslogtreecommitdiffstats
path: root/git-submodule.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2008-08-21 10:34:22 +0000
committerJunio C Hamano <junio@hera.kernel.org>2008-08-21 10:34:22 +0000
commit3f2f6e5d768e1e09e959ec54a26e552b5dfc4f14 (patch)
treed4d3b9e33da31ec8fb99af5d4376194ac84fbfa6 /git-submodule.txt
parent3580ad240fadb5ab479fd96c65350ec2b77c33bd (diff)
downloadgit-htmldocs-3f2f6e5d768e1e09e959ec54a26e552b5dfc4f14.tar.gz
Autogenerated HTML docs for v1.6.0-90-g436ed
Diffstat (limited to 'git-submodule.txt')
-rw-r--r--git-submodule.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/git-submodule.txt b/git-submodule.txt
index bf33b0cba..abbd5b72d 100644
--- a/git-submodule.txt
+++ b/git-submodule.txt
@@ -14,6 +14,7 @@ SYNOPSIS
'git submodule' [--quiet] init [--] [<path>...]
'git submodule' [--quiet] update [--init] [--] [<path>...]
'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
+'git submodule' [--quiet] foreach <command>
DESCRIPTION
@@ -123,6 +124,22 @@ summary::
in the submodule between the given super project commit and the
index or working tree (switched by --cached) are shown.
+foreach::
+ Evaluates an arbitrary shell command in each checked out submodule.
+ The command has access to the variables $path and $sha1:
+ $path is the name of the submodule directory relative to the
+ superproject, and $sha1 is the commit as recorded in the superproject.
+ Any submodules defined in the superproject but not checked out are
+ ignored by this command. Unless given --quiet, foreach prints the name
+ of each submodule before evaluating the command.
+ A non-zero return from the command in any submodule causes
+ 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.
+
+
OPTIONS
-------
-q::