git.droids-corp.org
/
git-central.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c43e65
)
Use quotes to avoid unary operator error.
author
Stephen Haberman
<stephen@exigencecorp.com>
Wed, 12 Nov 2008 05:04:59 +0000
(23:04 -0600)
committer
Stephen Haberman
<stephen@exigencecorp.com>
Wed, 12 Nov 2008 05:04:59 +0000
(23:04 -0600)
scripts/pull
patch
|
blob
|
history
diff --git
a/scripts/pull
b/scripts/pull
index
f2b149b
..
64de460
100644
(file)
--- 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"