Be more conservative with git fetch and fetch only the require branch
for both origin and PR branch.
This should speedup git fetch and save on disk space as only the
required history and changes are downloaded.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
echo "Pulling current $BRANCH from origin"
$GIT checkout $BRANCH
-$GIT fetch origin
+$GIT fetch origin $BRANCH
if ! $GIT rebase origin/$BRANCH; then
echo "Failed to rebase $BRANCH with origin/$BRANCH" >&2
fi
echo "Fetching remote $PR_USER"
-$GIT fetch $PR_USER
+$GIT fetch $PR_USER $PR_BRANCH
if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then
echo "Creating branch $LOCAL_PR_BRANCH for $PR_BRANCH"