summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-19 23:55:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-19 23:55:00 (GMT)
commit02112fcb705c334311290e7699a6c0dca7585b8d (patch)
tree0ca9828dc8177d4537c82276aedf345988c0871f
parent36a255acd14779ef21747b56341796e18c229976 (diff)
parent5c0cbdb107c5e1c1474618535fda438f25d260ca (diff)
downloadgit-02112fcb705c334311290e7699a6c0dca7585b8d.zip
git-02112fcb705c334311290e7699a6c0dca7585b8d.tar.gz
git-02112fcb705c334311290e7699a6c0dca7585b8d.tar.bz2
Merge branch 'en/prompt-under-set-u'
The bash prompt script (in contrib/) did not work under "set -u". * en/prompt-under-set-u: git-prompt: work under set -u
-rw-r--r--contrib/completion/git-prompt.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 4640a15..db7c006 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -433,8 +433,8 @@ __git_ps1 ()
fi
local sparse=""
- if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
- [ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&
+ if [ -z "${GIT_PS1_COMPRESSSPARSESTATE-}" ] &&
+ [ -z "${GIT_PS1_OMITSPARSESTATE-}" ] &&
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
sparse="|SPARSE"
fi
@@ -543,7 +543,7 @@ __git_ps1 ()
u="%${ZSH_VERSION+%}"
fi
- if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
+ if [ -n "${GIT_PS1_COMPRESSSPARSESTATE-}" ] &&
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
h="?"
fi