Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2800 from AnyOldName3/patch-1
Browse files Browse the repository at this point in the history
Allow GIT_PS1_COMPRESSSPARSESTATE to be unset
dscho committed Oct 9, 2020
2 parents 434da6a + 37c9baf commit cb58898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/completion/git-prompt.sh
Original file line number Diff line number Diff line change
@@ -431,8 +431,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
@@ -541,7 +541,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

0 comments on commit cb58898

Please sign in to comment.