mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
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>
This commit is contained in:
parent
afda36dbf3
commit
e8882a87d9
|
@ -433,7 +433,7 @@ __git_ps1 ()
|
||||||
local sparse=""
|
local sparse=""
|
||||||
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
|
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
|
||||||
[ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&
|
[ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&
|
||||||
[ "$(git config --bool core.sparseCheckout)" == "true" ]; then
|
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
|
||||||
sparse="|SPARSE"
|
sparse="|SPARSE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@ __git_ps1 ()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
|
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
|
||||||
[ "$(git config --bool core.sparseCheckout)" == "true" ]; then
|
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
|
||||||
h="?"
|
h="?"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue