From 9e1cda0fb7de69fb6e5de7bf54d00d3e993d8ec1 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 14 May 2022 21:29:27 -0400 Subject: [PATCH] Fixed the test --- diff-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index 9809b74c..cbf4dc85 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -65,7 +65,7 @@ else if [[ "$INPUT_USE_FORK_POINT" == "true" ]]; then echo "Getting fork point..." git fetch --no-tags -u --progress origin "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$? - PREVIOUS_SHA=$(git merge-base --fork-point "${TARGET_BRANCH}" "$CURRENT_BRANCH") && exit_status=$? || exit_status=$? + PREVIOUS_SHA=$(git merge-base --fork-point "${TARGET_BRANCH}" "$(git name-rev --name-only "$CURRENT_SHA")") && exit_status=$? || exit_status=$? else git fetch --no-tags -u --progress origin --depth=1 "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$? PREVIOUS_SHA=$(git rev-list --no-merges -n 1 "${TARGET_BRANCH}" 2>&1) && exit_status=$? || exit_status=$?