summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2016-11-20 11:27:34 +0000
committerFrediano Ziglio <fziglio@redhat.com>2016-11-20 11:27:34 +0000
commitae58b7d699be82d6fb3cd5c1455f8d407900e05d (patch)
treee184e0e9a9b86c33666d982dadb523d2ee8355a9
parent6e6011a4668f4c7b7d3a7a41922e9f8cae03adee (diff)
Allows to change branch where to rebase to
-rwxr-xr-xspice-server/rebase9
1 files changed, 5 insertions, 4 deletions
diff --git a/spice-server/rebase b/spice-server/rebase
index 3e450f3..4afcebc 100755
--- a/spice-server/rebase
+++ b/spice-server/rebase
@@ -2,6 +2,7 @@
# git remove where to push our branches
REMOTE_PUSH=fdo
+REBASE_TO=origin/master
set -e
@@ -26,7 +27,7 @@ try_compile() {
echo "failed:$failed_compile"
echo "compiling $branch ..."
if test $COMPILE = full; then
- for commit in $(git rev-list origin/master..$branch --reverse); do
+ for commit in $(git rev-list ${REBASE_TO}..$branch --reverse); do
echo "checking branch $branch commit $commit"
git checkout $commit &> /dev/null
if ! make -j3 &> compile_err_$branch.txt; then
@@ -71,14 +72,14 @@ do
fi
# check if already in sync (so no need to checkout)
- if ! branch_need_push "$branch" && test "$COMPILE" = no -a "$(git rev-list "heads/$branch..origin/master" | wc -l)" = 0; then
+ if ! branch_need_push "$branch" && test "$COMPILE" = no -a "$(git rev-list "heads/$branch..${REBASE_TO}" | wc -l)" = 0; then
processed+=" $branch"
continue
fi
- # try to rebase on top of master
+ # try to rebase on top of specified branch
git checkout $branch
- if git rebase origin/master; then
+ if git rebase ${REBASE_TO}; then
# if there is a remote on the git remote specified push to it
if branch_need_push "$branch"; then
echo "Pushing branch $branch ..."