From 61ed208946dc87f003de677c03c228a9e61510f1 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 15 Oct 2022 16:26:42 -0600 Subject: [PATCH] Updated diff-sha.sh --- diff-sha.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/diff-sha.sh b/diff-sha.sh index 7d681393..815ae428 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -79,6 +79,10 @@ if [[ -z $GITHUB_BASE_REF ]]; then echo "::debug::Getting base SHA for '$INPUT_SINCE'..." PREVIOUS_SHA=$(git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse | head -n 1) + git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse | grep -n "$PREVIOUS_SHA" + + git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse + if [[ -z "$PREVIOUS_SHA" ]]; then echo "::error::Unable to locate a previous commit for the specified date: $INPUT_SINCE" exit 1