summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-06-30 11:55:37 -0700
committerJunio C Hamano <gitster@pobox.com>2010-06-30 11:55:37 -0700
commit304d8b6256db7aca7772c0a994a7c1c987eabd97 (patch)
treec6e073a3850f9e7ced78ae4995c4cd9eac4d5fc3 /contrib/completion
parent8b3120dbaffd03cfa23c2a46bc4b5f29d9460734 (diff)
parent6c44b6406bc9093945aa030f33c06ecda47ba7f5 (diff)
downloadgit-304d8b6256db7aca7772c0a994a7c1c987eabd97.tar.gz
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/completion')
-rwxr-xr-xcontrib/completion/git-completion.bash14
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