From 2e9dd79645dd3dfe7eab3cbf17afe66718588a45 Mon Sep 17 00:00:00 2001 From: Marco Iorio Date: Wed, 12 May 2021 13:28:33 -0400 Subject: [PATCH] Fix failure if base and head branches have the same name (#77) (cherry picked from commit f9a064200e1952f264a825a24f496049cf7f1ca9) --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b428e28..6467ce8 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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