summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorDavid J. Malan <malan@harvard.edu>2020-07-21 00:15:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-21 00:37:20 (GMT)
commite8882a87d9c479fd9d6e71a5840e949579304ab9 (patch)
tree9882f445bfcc2ea6486052a72339ed7a68484750 /contrib/completion
parentafda36dbf3b4f5a489ab44c00d5210c1fa894a40 (diff)
downloadgit-e8882a87d9c479fd9d6e71a5840e949579304ab9.zip
git-e8882a87d9c479fd9d6e71a5840e949579304ab9.tar.gz
git-e8882a87d9c479fd9d6e71a5840e949579304ab9.tar.bz2
git-prompt: change == to = for zsh's sake
When using git-prompt.sh with zsh, __git_ps1 currently errs when inside a repo with: __git_ps1:96: = not found Avoid using non-portable "==" that is only understood by bash and not zsh. Change to "=" so that the prompt script becomes usable with zsh again. Signed-off-by: David J. Malan <malan@harvard.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-prompt.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index e6cd546..16260ba 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -433,7 +433,7 @@ __git_ps1 ()
local sparse=""
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
[ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&
- [ "$(git config --bool core.sparseCheckout)" == "true" ]; then
+ [ "$(git config --bool core.sparseCheckout)" = "true" ]; then
sparse="|SPARSE"
fi
@@ -542,7 +542,7 @@ __git_ps1 ()
fi
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
- [ "$(git config --bool core.sparseCheckout)" == "true" ]; then
+ [ "$(git config --bool core.sparseCheckout)" = "true" ]; then
h="?"
fi