* [PATCH] git-submodule.sh: setup uninitialized variables
@ 2020-04-02 8:42 Jiang Xin
2020-04-02 15:11 ` Eric Sunshine
0 siblings, 1 reply; 3+ messages in thread
From: Jiang Xin @ 2020-04-02 8:42 UTC (permalink / raw)
To: Junio C Hamano, Git List; +Cc: xuejiang, Jiang Xin
From: xuejiang <xuejiang@alibaba-inc.com>
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 pathspect '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>
---
git-submodule.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/git-submodule.sh b/git-submodule.sh
index 1cb2c0a31b..d69d24a857 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -43,6 +43,8 @@ custom_name=
depth=
progress=
dissociate=
+jobs=
+recommend_shallow=
die_if_unmatched ()
{
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] git-submodule.sh: setup uninitialized variables
2020-04-02 8:42 [PATCH] git-submodule.sh: setup uninitialized variables Jiang Xin
@ 2020-04-02 15:11 ` Eric Sunshine
2020-04-03 2:56 ` Jiang Xin
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sunshine @ 2020-04-02 15:11 UTC (permalink / raw)
To: Jiang Xin; +Cc: Junio C Hamano, Git List, xuejiang
On Thu, Apr 2, 2020 at 4:43 AM Jiang Xin <worldhello.net@gmail.com> wrote:
> 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 pathspect '16' for Git command is from the environment variable
> "jobs".
s/pathspect/pathspec/
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] git-submodule.sh: setup uninitialized variables
2020-04-02 15:11 ` Eric Sunshine
@ 2020-04-03 2:56 ` Jiang Xin
0 siblings, 0 replies; 3+ messages in thread
From: Jiang Xin @ 2020-04-03 2:56 UTC (permalink / raw)
To: Eric Sunshine; +Cc: Junio C Hamano, Git List, xuejiang
Eric Sunshine <sunshine@sunshineco.com> 于2020年4月2日周四 下午11:11写道:
>
> On Thu, Apr 2, 2020 at 4:43 AM Jiang Xin <worldhello.net@gmail.com> wrote:
> > 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 pathspect '16' for Git command is from the environment variable
> > "jobs".
>
> s/pathspect/pathspec/
Thanks, Eric. I find Junio has already fixed the typo in his feature branch:
* https://github.com/gitster/git/commits/lx/submodule-clear-variables
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-03 2:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 8:42 [PATCH] git-submodule.sh: setup uninitialized variables Jiang Xin
2020-04-02 15:11 ` Eric Sunshine
2020-04-03 2:56 ` Jiang Xin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).