From: Stephen Haberman Date: Wed, 12 Nov 2008 05:04:59 +0000 (-0600) Subject: Use quotes to avoid unary operator error. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6e29ef2bc1386c9116d32f25aecccb55ab7971e6;p=git-central.git Use quotes to avoid unary operator error. --- diff --git a/scripts/pull b/scripts/pull index f2b149b..64de460 100644 --- a/scripts/pull +++ b/scripts/pull @@ -5,7 +5,6 @@ if [[ $? -ne 0 ]] ; then echo "Not on a branch" exit 1 fi - branch_name=${branch_name/refs\/heads\//} git fetch @@ -13,7 +12,8 @@ if [[ $? -ne 0 ]] ; then exit $? fi -if test $(git rev-parse HEAD) = $(git merge-base HEAD origin/$branch_name) ; then +# rebase-p-i stops if nothing to do, even a ff, so do a non-i-p if needed +if test "$(git rev-parse HEAD)" = "$(git merge-base HEAD origin/$branch_name)" ; then git rebase "origin/$branch_name" else GIT_EDITOR=: git rebase -p -i "origin/$branch_name"