diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-30 11:55:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-30 11:55:37 -0700 |
commit | 304d8b6256db7aca7772c0a994a7c1c987eabd97 (patch) | |
tree | c6e073a3850f9e7ced78ae4995c4cd9eac4d5fc3 | |
parent | 8b3120dbaffd03cfa23c2a46bc4b5f29d9460734 (diff) | |
parent | 6c44b6406bc9093945aa030f33c06ecda47ba7f5 (diff) | |
download | git-304d8b6256db7aca7772c0a994a7c1c987eabd97.tar.gz git-304d8b6256db7aca7772c0a994a7c1c987eabd97.tar.xz |
Merge branch 'as/maint-completion-set-u-fix'
* as/maint-completion-set-u-fix:
bash-completion: Fix __git_ps1 to work with "set -u"
-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 14874377a..bc9df12bf 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 |