From ab710fb168fc55bfac95911978c4784bf01f3575 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Wed, 15 Feb 2023 19:35:16 -0700 Subject: [PATCH] Fixed the test --- diff-sha.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index 469c7f10..9798bfea 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -60,7 +60,8 @@ if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF ]]; then if [[ -f .git/shallow ]]; then echo "Fetching remote refs..." # shellcheck disable=SC2086 - git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH" 1>/dev/null || true + git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$CURRENT_BRANCH":refs/remotes/origin/"$CURRENT_BRANCH" 1>/dev/null + git branch --track "$CURRENT_BRANCH" origin/"$CURRENT_BRANCH" 1>/dev/null || true fi echo "::debug::Getting HEAD SHA..."