Skip to content

Commit

Permalink
Merge branch 'as/maint-completion-set-u-fix'
Browse files Browse the repository at this point in the history
* as/maint-completion-set-u-fix:
  bash-completion: Fix __git_ps1 to work with "set -u"
  • Loading branch information
Junio C Hamano committed Jun 30, 2010
2 parents 8b3120d + 6c44b64 commit 304d8b6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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")"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 304d8b6

Please sign in to comment.