From cf9957875c3a27b6ae4593e1fa9d4dabbde68433 Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Fri, 6 Feb 2009 11:05:37 -0500 Subject: [PATCH] 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 --- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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="*" -- 2.30.2