Commit 58e30827 authored by Brendan Long's avatar Brendan Long

Fix --branch to checkout before rebasing.

parent 4df91104
......@@ -169,7 +169,11 @@ for module in ${GST_MODULES[@]} ; do
# -p means "don't remove merges"
# requires the branch to be previously checked out
echo "Rebasing to origin/$MODULE_BRANCH"
git rebase -p origin/$MODULE_BRANCH $MODULE_BRANCH || errors="$errors\nUnable to rebase local branch $MODULE_BRANCH onto remote branch origin/$MODULE_BRANCH for repo $module"
if git checkout $MODULE_BRANCH ; then
git rebase origin/$MODULE_BRANCH || errors="$errors\nUnable to rebase local branch $MODULE_BRANCH onto remote branch origin/$MODULE_BRANCH for repo $module"
else
errors="$errors\nUnable to checkout branch $MODULE_BRANCH for repo $module"
fi
else
cd $module
if [ -n "$DEFAULT_BRANCH" ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment