Skip to content

Commit de8d9e1

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #2800 from AnyOldName3/patch-1
Allow GIT_PS1_COMPRESSSPARSESTATE to be unset
2 parents 27743ac + d89bfc1 commit de8d9e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/completion/git-prompt.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ __git_ps1 ()
431431
fi
432432

433433
local sparse=""
434-
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
435-
[ -z "${GIT_PS1_OMITSPARSESTATE}" ] &&
434+
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE-}" ] &&
435+
[ -z "${GIT_PS1_OMITSPARSESTATE-}" ] &&
436436
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
437437
sparse="|SPARSE"
438438
fi
@@ -541,7 +541,7 @@ __git_ps1 ()
541541
u="%${ZSH_VERSION+%}"
542542
fi
543543

544-
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE}" ] &&
544+
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE-}" ] &&
545545
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
546546
h="?"
547547
fi

0 commit comments

Comments
 (0)