git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-submodule.sh: properly initialize shell variables

From
Gerrit Pape <pape@smarden.org>
Date
Apr 26, 2010, 09:50 UTC
Message-ID
<20100426095039.20264.qmail@7cdeaa1bd53836.315fe32.mid.smarden.org>

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>
---
 git-submodule.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 2dd372a..3319b83 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -21,6 +21,8 @@ command=
 branch=
 reference=
 cached=
+recursive=
+init=
 files=
 nofetch=
 update=
-- 
1.7.0.3
Message 1 of 1 in “git-submodule.sh: properly initialize shell variables”
  1. git-submodule.sh: properly initialize shell variablesGerrit Pape, Apr 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.