Skip to content
Permalink
Browse files
Merge pull request #2800 from AnyOldName3/patch-1
Allow GIT_PS1_COMPRESSSPARSESTATE to be unset
  • Loading branch information
dscho committed Oct 8, 2020
2 parents 0b6a63d + 04e582a commit 3706bcf983fcbab7efacdb3b049509ebdcaf0320
Showing 1 changed file with 3 additions and 3 deletions.
@@ -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 3706bcf

Please sign in to comment.