From: Ted Pavlic Date: Fri, 6 Feb 2009 16:05:37 +0000 (-0500) Subject: completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors. X-Git-Tag: v1.6.2-rc1~48 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cf9957875c3a27b6ae4593e1fa9d4dabbde68433;p=git.git completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors. Signed-off-by: Ted Pavlic Acked-by: Shawn O. Pearce Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 307bf5d4f..6e0498507 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -125,7 +125,7 @@ __git_ps1 () local w local i - if test -n "$GIT_PS1_SHOWDIRTYSTATE"; then + if test -n "${GIT_PS1_SHOWDIRTYSTATE-}"; then if test "$(git config --bool bash.showDirtyState)" != "false"; then git diff --no-ext-diff --ignore-submodules \ --quiet --exit-code || w="*"