aboutsummaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-13 11:21:49 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-13 11:21:49 -0700
commit08b56871ff7ade47310461cf7f6f4f8e72200c60 (patch)
treea0743607c6ada22ce4e4f79061046e94219632c6 /git-submodule.sh
parent534930807c230436a2b3f4891df810af0b8c0353 (diff)
parentf030c96d8643fa0a1a9b2bd9c2f36a77721fb61f (diff)
downloadgit-08b56871ff7ade47310461cf7f6f4f8e72200c60.tar.xz
Merge branch 'ab/submodule-foreach-toplevel'
* ab/submodule-foreach-toplevel: git-submodule foreach: Add $toplevel variable
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 8175cb279d..8c562a72e6 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -271,6 +271,8 @@ cmd_foreach()
shift
done
+ toplevel=$(pwd)
+
module_list |
while read mode sha1 stage path
do