Skip to content

Commit

Permalink
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
  • Loading branch information
dscho committed Oct 15, 2020
2 parents a1a57d6 + 1a2f72a commit 5a44efd
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
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a44efd

Please sign in to comment.