Skip to content

Commit 649ae55

Browse files
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)
1 parent e2023b9 commit 649ae55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/scripts/get-or-create-release-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ else
5959
commit_sha=$(git rev-parse --short HEAD)
6060
if git ls-remote --exit-code --heads origin "${branch_name}"; then
6161
# The release branch already exists, we need to make sure that our commit is its current tip
62-
branch_head_sha=$(git rev-parse --verify --short "refs/heads/${branch_name}")
62+
branch_head_sha=$(git rev-parse --verify --short "refs/remotes/origin/${branch_name}")
6363
if [[ "${branch_head_sha}" != "${commit_sha}" ]]; then
6464
echo "The release branch - ${branch_name} - already exists. ${commit_sha}, the commit you chose when "
6565
echo "launching this release, is not its current HEAD (${branch_head_sha}). This is not allowed: you "

0 commit comments

Comments
 (0)