Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Xuejiang <xuejiang@alibaba-inc.com>2020-04-02 11:42:51 +0300
committerJunio C Hamano <gitster@pobox.com>2020-04-02 21:19:33 +0300
commit65d100c4ddbe83953870be2e08566086e4b1cd3c (patch)
treef714b9949859b80802578ec526cdd2aca9cfb283 /git-submodule.sh
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
git-submodule.sh: setup uninitialized variables
We have an environment variable `jobs=16` defined in our CI system, and this environment makes our build job failed with the following message: error: pathspec '16' did not match any file(s) known to git The pathspec '16' for Git command is from the environment variable "jobs". This is because "git-submodule" command is implemented in shell script, and environment variables may change its behavior. Set values for uninitialized variables, such as "jobs" and "recommend_shallow" will fix this issue. Helped-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Li Xuejiang <xuejiang@alibaba-inc.com> 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 aaa1809d24..aba3e109a4 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -47,6 +47,8 @@ custom_name=
depth=
progress=
dissociate=
+jobs=
+recommend_shallow=
die_if_unmatched ()
{