Browse Source

completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.

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>
maint
Ted Pavlic 16 years ago committed by Junio C Hamano
parent
commit
cf9957875c
  1. 2
      contrib/completion/git-completion.bash

2
contrib/completion/git-completion.bash

@ -125,7 +125,7 @@ __git_ps1 () @@ -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="*"

Loading…
Cancel
Save