summaryrefslogtreecommitdiff
path: root/contrib/completion/git-completion.bash
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-04-13 22:28:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-13 22:28:53 (GMT)
commite0d4a63c0960a9e999964dbf4dea56f9f090f93e (patch)
tree86dc789424db99b09b8f05623405df148bfe0ba0 /contrib/completion/git-completion.bash
parente6545201ad8b26befc627fbe0be366e1ebad99d8 (diff)
parentc5c0548d793edf4a6e319f237f3a01a1f093bbd7 (diff)
downloadgit-e0d4a63c0960a9e999964dbf4dea56f9f090f93e.zip
git-e0d4a63c0960a9e999964dbf4dea56f9f090f93e.tar.gz
git-e0d4a63c0960a9e999964dbf4dea56f9f090f93e.tar.bz2
Merge branch 'vs/completion-with-set-u'
The command-line completion script (in contrib/) had a couple of references that would have given a warning under the "-u" (nounset) option. * vs/completion-with-set-u: completion: audit and guard $GIT_* against unset use
Diffstat (limited to 'contrib/completion/git-completion.bash')
-rw-r--r--contrib/completion/git-completion.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e1a6695..29b859a 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -77,7 +77,7 @@ __git_find_repo_path ()
test -d "$__git_dir" &&
__git_repo_path="$__git_dir"
elif [ -n "${GIT_DIR-}" ]; then
- test -d "${GIT_DIR-}" &&
+ test -d "$GIT_DIR" &&
__git_repo_path="$GIT_DIR"
elif [ -d .git ]; then
__git_repo_path=.git
@@ -427,7 +427,7 @@ __gitcomp_builtin ()
if [ -z "$options" ]; then
local completion_helper
- if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then
+ if [ "${GIT_COMPLETION_SHOW_ALL-}" = "1" ]; then
completion_helper="--git-completion-helper-all"
else
completion_helper="--git-completion-helper"
@@ -1910,7 +1910,7 @@ _git_help ()
return
;;
esac
- if test -n "$GIT_TESTING_ALL_COMMAND_LIST"
+ if test -n "${GIT_TESTING_ALL_COMMAND_LIST-}"
then
__gitcomp "$GIT_TESTING_ALL_COMMAND_LIST $(__git --list-cmds=alias,list-guide) gitk"
else