Unverified Commit 51047b18 authored by Luca Palmieri's avatar Luca Palmieri Committed by GitHub
Browse files

Use `refs/remote/<remote-name>/<branch-name>` to avoid a "Fatal: needed a...

Use `refs/remote/<remote-name>/<branch-name>` to avoid a "Fatal: needed a single revision" error, as we have seen in https://github.com/awslabs/smithy-rs/actions/runs/4105169302/jobs/7082226485 (#2313)
parent c9275fbf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 "