#571087 /etc/bash_completion.d/git: breaks if bash is running with nounset

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Thomas Nilsson
Date:
2011-09-21 09:45:15 UTC
Severity:
normal
#571087#5
Date:
2010-02-23 11:13:00 UTC
From:
To:
knirch@traktor:~/source/external/git (master)$ set -o nounset
bash: w: unbound variable
knirch@traktor:~/source/external/git$ git ^Ibash: command: unbound
variable
bash: w: unbound variable
knirch@traktor:~/source/external/git$

Running with:
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
and PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1 " (%s)")\$ '

#571087#10
Date:
2010-02-23 16:05:15 UTC
From:
To:
Hi Thomas,

Thomas Nilsson wrote:

Thanks for the report.  I realize it can be used to find real bugs,
but is it really useful to use that option in interactive shells?

I have not investigated the other hunks yet.  This one can be fixed by
replacing [ -z "$command" ] with [ -z "${command:+set}" ] below, which
seems preferable to me.

Regards,
Jonathan