summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2010-04-26 11:50:39 +0200
committerJunio C Hamano <gitster@pobox.com>2010-05-01 11:11:52 -0700
commit48bb30331dc1139a7279d1665cfc76f14b5d0e67 (patch)
tree02af13fe02e3917bb15143c9333cc8966226358e /git-submodule.sh
parente92e9cd3c388544f4f521736df844b37908c3879 (diff)
downloadgit-48bb30331dc1139a7279d1665cfc76f14b5d0e67.tar.gz
git-submodule.sh: properly initialize shell variables
git-submodule inherits variables from the environment it is started in, expects the internal variables init= and recursive= to have an empty value, but doesn't initialize them appropriately. Thanks to the selftests, this can be reproduced through init=1 make test recursive=1 make test With this commit the variables are initialized, and the selftests succeed even if these variables have some values in the environment. The bug was discovered through the Debian autobuilders http://bugs.debian.org/569594 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 e2082fd149..d3c583d011 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -21,6 +21,8 @@ command=
branch=
reference=
cached=
+recursive=
+init=
files=
nofetch=
update=