mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-17 13:05:36 -05:00
After `set -u` in Bash, the Git prompt would not be displayed and the error `bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable` would be printed, due to `GIT_PS1_COMPRESSSPARSESTATE` being unset by default when it gets used. This change sets a default value of an empty string to use when the variable is unset to explicitly make the behaviour consistent between `set -u` and `set +u`. This fixes https://github.com/git-for-windows/git/issues/2799 Signed-off-by: Chris Djali <krizdjali+github@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>