Skip to content

Commit

Permalink
Fix failure if base and head branches have the same name (cirrus-acti…
Browse files Browse the repository at this point in the history
…ons#77)

(cherry picked from commit f9a0642)
  • Loading branch information
giorio94 authored and xzile committed Apr 19, 2022
1 parent eac4467 commit 139f40e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ git fetch origin $BASE_BRANCH
git fetch fork $HEAD_BRANCH

# do the rebase
git checkout -b $HEAD_BRANCH fork/$HEAD_BRANCH
git checkout -b fork/$HEAD_BRANCH fork/$HEAD_BRANCH
if git rebase origin/$BASE_BRANCH; then
# push back
git push --force-with-lease fork $HEAD_BRANCH
git push --force-with-lease fork fork/$HEAD_BRANCH:$HEAD_BRANCH
else
echo "Automatic rebase failed"
exit 1
Expand Down

0 comments on commit 139f40e

Please sign in to comment.