Web lists-archives.com

contrib/completion/git-completion.bash: declare -g is not portable




Hej Duy,
After running t9902-completion.sh on Mac OS I got a failure
in this style:

.../projects/git/git.pu/t/../contrib/completion/git-completion.bash: line 300:
declare: -g: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
--- expected	2018-02-03 17:10:18.000000000 +0000
+++ out	2018-02-03 17:10:18.000000000 +0000
@@ -1,15 +1,2 @@
---quiet
---detach
---track
---orphan=
---ours
---theirs
---merge
---conflict=
---patch
---ignore-skip-worktree-bits
---ignore-other-worktrees
---recurse-submodules
---progress
 --no-track
 --no-recurse-submodules
not ok 92 - double dash "git checkout"

What is "declare -g" good for ?

<https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#index-declare>