Skip to content

Commit

Permalink
git-submodule.sh: properly initialize shell variables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gerrit Pape authored and Junio C Hamano committed May 1, 2010
1 parent e92e9cd commit 48bb303
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ command=
branch=
reference=
cached=
recursive=
init=
files=
nofetch=
update=
Expand Down

0 comments on commit 48bb303

Please sign in to comment.