Skip to content

Commit

Permalink
Use refs/remote/<remote-name>/<branch-name> to avoid a "Fatal: need…
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker authored Feb 6, 2023
1 parent c9275fb commit 51047b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/get-or-create-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ else
commit_sha=$(git rev-parse --short HEAD)
if git ls-remote --exit-code --heads origin "${branch_name}"; then
# The release branch already exists, we need to make sure that our commit is its current tip
branch_head_sha=$(git rev-parse --verify --short "refs/heads/${branch_name}")
branch_head_sha=$(git rev-parse --verify --short "refs/remotes/origin/${branch_name}")
if [[ "${branch_head_sha}" != "${commit_sha}" ]]; then
echo "The release branch - ${branch_name} - already exists. ${commit_sha}, the commit you chose when "
echo "launching this release, is not its current HEAD (${branch_head_sha}). This is not allowed: you "
Expand Down

0 comments on commit 51047b1

Please sign in to comment.