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

2016-06-06 Thread Ville Skyttä
On Mon, Jun 6, 2016 at 11:08 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, and

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

2016-06-06 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, and initialize $short_sha before use. > > Signed-off-by: Ville Skyttä

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

2016-06-06 Thread Ville Skyttä
On Mon, Jun 6, 2016 at 7:29 PM, Ville Skyttä wrote: > 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, and initialize $short_sha before use. No part 2/2 will be

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

2016-06-06 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, and initialize $short_sha before use. Signed-off-by: Ville Skyttä --- contrib/completion/git-prompt.sh | 6 +++---