diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-30 20:55:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-30 20:55:37 +0200 |
commit | 304d8b6256db7aca7772c0a994a7c1c987eabd97 (patch) | |
tree | c6e073a3850f9e7ced78ae4995c4cd9eac4d5fc3 /contrib | |
parent | Merge branch 'mg/rev-parse-tests' (diff) | |
parent | bash-completion: Fix __git_ps1 to work with "set -u" (diff) | |
download | git-304d8b6256db7aca7772c0a994a7c1c987eabd97.tar.xz git-304d8b6256db7aca7772c0a994a7c1c987eabd97.zip |
Merge branch 'as/maint-completion-set-u-fix'
* as/maint-completion-set-u-fix:
bash-completion: Fix __git_ps1 to work with "set -u"
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/completion/git-completion.bash | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 14874377af..bc9df12bf1 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -84,8 +84,8 @@ __git_ps1 () { local g="$(__gitdir)" if [ -n "$g" ]; then - local r - local b + local r="" + local b="" if [ -f "$g/rebase-merge/interactive" ]; then r="|REBASE-i" b="$(cat "$g/rebase-merge/head-name")" @@ -127,11 +127,11 @@ __git_ps1 () } fi - local w - local i - local s - local u - local c + local w="" + local i="" + local s="" + local u="" + local c="" if [ "true" = "$(git rev-parse --is-inside-git-dir 2>/dev/null)" ]; then if [ "true" = "$(git rev-parse --is-bare-repository 2>/dev/null)" ]; then |