3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-16 23:17:49 +00:00

Updated diff-sha.sh

This commit is contained in:
Tonye Jack 2022-11-17 08:16:17 -07:00
parent 3b10cebd3d
commit 30b9252953
2 changed files with 2 additions and 2 deletions

View file

@ -80,7 +80,7 @@ inputs:
fetch_depth: fetch_depth:
description: "Initial depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history." description: "Initial depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
required: false required: false
default: "10" default: "40"
max_fetch_depth: max_fetch_depth:
description: "Maximum depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history." description: "Maximum depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
required: false required: false

View file

@ -191,7 +191,7 @@ else
PREVIOUS_SHA=$(git rev-parse $(git branch -r --sort=-committerdate | head -1) 2>&1) && exit_status=$? || exit_status=$? PREVIOUS_SHA=$(git rev-parse $(git branch -r --sort=-committerdate | head -1) 2>&1) && exit_status=$? || exit_status=$?
fi fi
else else
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$? PREVIOUS_SHA=$(git merge-base --fork-point "$CURRENT_BRANCH" "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
fi fi
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then