Skip to content

Commit

Permalink
completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable er…
Browse files Browse the repository at this point in the history
…rors.

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>
  • Loading branch information
Ted Pavlic authored and Junio C Hamano committed Feb 9, 2009
1 parent ffe4da1 commit cf99578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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="*"
Expand Down

0 comments on commit cf99578

Please sign in to comment.