Files
git/contrib/completion
Chris Djali 2c1a8137ae prompt: Avoid using unset variables
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>
2021-05-17 11:08:39 +02:00
..