aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-submodule.txt
diff options
context:
space:
mode:
authorJohan Herland <johan@herland.net>2009-08-16 03:10:08 +0200
committerJunio C Hamano <gitster@pobox.com>2009-08-18 12:27:57 -0700
commit1e7f2aad7dd9b0b5ec8bbae2e3015915687e2cd2 (patch)
treed6cc7241629d08aa5efbd5c4b67e61b0ea9f80a4 /Documentation/git-submodule.txt
parent64d5fe0a23e3a16179c7c185662f25d85fe631dd (diff)
downloadgit-1e7f2aad7dd9b0b5ec8bbae2e3015915687e2cd2.tar.gz
git submodule foreach: Provide access to submodule name, as '$name'
The argument to 'git submodule foreach' already has access to the variables '$path' (the path to the submodule, relative to the superproject) and '$sha1' (the submodule commit recorded by the superproject). This patch adds another variable -- '$name' -- which contains the name of the submodule, as recorded in the superproject's .gitmodules file. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-submodule.txt')
-rw-r--r--Documentation/git-submodule.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 7dd73ae14e..97c32fe264 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -131,7 +131,8 @@ summary::
foreach::
Evaluates an arbitrary shell command in each checked out submodule.
- The command has access to the variables $path and $sha1:
+ The command has access to the variables $name, $path and $sha1:
+ $name is the name of the relevant submodule section in .gitmodules,
$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