Code

completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.
authorTed Pavlic <ted@tedpavlic.com>
Fri, 6 Feb 2009 16:05:37 +0000 (11:05 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Feb 2009 06:07:46 +0000 (22:07 -0800)
Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index 307bf5d4f98d2d4c26b130fe69807223b64f5bb4..6e04985079671964568d160c5ef8f5495b12eabc 100755 (executable)
@@ -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="*"