From 7f2aa19bdcf4a00195671e368091a1e32a694ac5 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Thu, 9 Feb 2023 07:33:33 -0700 Subject: [PATCH] chore: update use of tilde to use caret instead (#975) --- diff-sha.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diff-sha.sh b/diff-sha.sh index 8463c41a..896e0515 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -107,14 +107,14 @@ if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF ]]; then if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then PREVIOUS_SHA=$GITHUB_EVENT_BEFORE && exit_status=$? || exit_status=$? else - PREVIOUS_SHA=$(git rev-list -n 1 "HEAD~1") && exit_status=$? || exit_status=$? + PREVIOUS_SHA=$(git rev-list -n 1 "HEAD^") && exit_status=$? || exit_status=$? fi else - PREVIOUS_SHA=$(git rev-list -n 1 "HEAD~1") && exit_status=$? || exit_status=$? + PREVIOUS_SHA=$(git rev-list -n 1 "HEAD^") && exit_status=$? || exit_status=$? fi if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then - PREVIOUS_SHA=$(git rev-list -n 1 "HEAD~1") && exit_status=$? || exit_status=$? + PREVIOUS_SHA=$(git rev-list -n 1 "HEAD^") && exit_status=$? || exit_status=$? fi if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then