Re: [PATCH] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION

2016-06-06 Thread Ville Skyttä
On Tue, May 24, 2016 at 8:27 PM, Junio C Hamano wrote: > Ville Skyttä writes: > >> When the shell is in "nounset" or "set -u" mode, referencing unset or >> null variables results in an error. Protect $ZSH_VERSION and >> $BASH_VERSION against that. >>

Re: [PATCH] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION

2016-05-24 Thread Junio C Hamano
Junio C Hamano writes: > Others, I am not sure how seriously we would want to support those > who use "set -u"; the damage to test-lib.sh so far (see below) does > not look _too_ bad, but the reason why I have "set -u" after > including lib-bash.sh is because it will trigger a

Re: [PATCH] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION

2016-05-24 Thread Junio C Hamano
Ville Skyttä writes: > When the shell is in "nounset" or "set -u" mode, referencing unset or > null variables results in an error. Protect $ZSH_VERSION and > $BASH_VERSION against that. > local ps1_expanded=yes > - [ -z "$ZSH_VERSION" ] || [[ -o PROMPT_SUBST ]] ||

Re: [PATCH] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION

2016-05-24 Thread Junio C Hamano
Ville Skyttä writes: > When the shell is in "nounset" or "set -u" mode, referencing unset or > null variables results in an error. Protect $ZSH_VERSION and > $BASH_VERSION against that. > > Signed-off-by: Ville Skyttä > --- Makes sense from a cursory

[PATCH] git-prompt.sh: Don't error on null ${ZSH,BASH}_VERSION

2016-05-24 Thread Ville Skyttä
When the shell is in "nounset" or "set -u" mode, referencing unset or null variables results in an error. Protect $ZSH_VERSION and $BASH_VERSION against that. Signed-off-by: Ville Skyttä --- contrib/completion/git-prompt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2