{"thread":{"id":"53157","subject":"[PATCH] git-submodule.sh: setup uninitialized variables","startedAt":"2020-04-02T08:43:05Z","lastAt":"2020-04-03T02:56:51Z","messageCount":3,"participants":["Jiang Xin","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"394555","messageId":"20200402084251.85840-1-zhiyou.jx@alibaba-inc.com","threadId":"53157","inReplyTo":null,"subject":"[PATCH] git-submodule.sh: setup uninitialized variables","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2020-04-02T08:42:51Z","receivedAt":"2020-04-02T08:43:05Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"From: xuejiang <xuejiang@alibaba-inc.com>\n\nWe have an environment variable `jobs=16` defined in our CI system, and\nthis environment makes our build job failed with the following message:\n\n    error: pathspec '16' did not match any file(s) known to git\n\nThe pathspect '16' for Git command is from the environment variable\n\"jobs\".\n\nThis is because \"git-submodule\" command is implemented in shell script,\nand environment variables may change its behavior.  Set values for\nuninitialized variables, such as \"jobs\" and \"recommend_shallow\" will\nfix this issue.\n\nHelped-by: Jiang Xin <worldhello.net@gmail.com>\nSigned-off-by: Li Xuejiang <xuejiang@alibaba-inc.com>\n---\n git-submodule.sh | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex 1cb2c0a31b..d69d24a857 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -43,6 +43,8 @@ custom_name=\n depth=\n progress=\n dissociate=\n+jobs=\n+recommend_shallow=\n \n die_if_unmatched ()\n {\n-- \n2.20.1.7.g153144c\n\n"},{"id":"394589","messageId":"CAPig+cTp3AhYXX_cjU48yLyMHBF1fOgwHw2ZC5rGWvYFE_bmQw@mail.gmail.com","threadId":"53157","inReplyTo":"20200402084251.85840-1-zhiyou.jx@alibaba-inc.com","subject":"Re: [PATCH] git-submodule.sh: setup uninitialized variables","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-04-02T15:11:28Z","receivedAt":"2020-04-02T15:11:47Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Apr 2, 2020 at 4:43 AM Jiang Xin <worldhello.net@gmail.com> wrote:\n> We have an environment variable `jobs=16` defined in our CI system, and\n> this environment makes our build job failed with the following message:\n>\n>     error: pathspec '16' did not match any file(s) known to git\n>\n> The pathspect '16' for Git command is from the environment variable\n> \"jobs\".\n\ns/pathspect/pathspec/\n\n> This is because \"git-submodule\" command is implemented in shell script,\n> and environment variables may change its behavior.  Set values for\n> uninitialized variables, such as \"jobs\" and \"recommend_shallow\" will\n> fix this issue.\n>\n> Helped-by: Jiang Xin <worldhello.net@gmail.com>\n> Signed-off-by: Li Xuejiang <xuejiang@alibaba-inc.com>\n"},{"id":"394637","messageId":"CANYiYbE0DwRNpfGpX-dsiCF0i5avWYqqNLqOsGRAUJcgceUA4w@mail.gmail.com","threadId":"53157","inReplyTo":"CAPig+cTp3AhYXX_cjU48yLyMHBF1fOgwHw2ZC5rGWvYFE_bmQw@mail.gmail.com","subject":"Re: [PATCH] git-submodule.sh: setup uninitialized variables","fromName":"Jiang Xin","fromEmail":"worldhello.net@gmail.com","sentAt":"2020-04-03T02:56:30Z","receivedAt":"2020-04-03T02:56:51Z","isPatch":true,"sender":{"key":"worldhello.net@gmail.com","avatar":"https://avatars.githubusercontent.com/u/183860?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> 于2020年4月2日周四 下午11:11写道：\n>\n> On Thu, Apr 2, 2020 at 4:43 AM Jiang Xin <worldhello.net@gmail.com> wrote:\n> > We have an environment variable `jobs=16` defined in our CI system, and\n> > this environment makes our build job failed with the following message:\n> >\n> >     error: pathspec '16' did not match any file(s) known to git\n> >\n> > The pathspect '16' for Git command is from the environment variable\n> > \"jobs\".\n>\n> s/pathspect/pathspec/\n\nThanks, Eric.  I find Junio has already fixed the typo in his feature branch:\n\n* https://github.com/gitster/git/commits/lx/submodule-clear-variables\n"}]}