Skip to content

Commit

Permalink
Updated diff-sha.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Nov 17, 2022
1 parent 3b10ceb commit 30b9252
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -80,7 +80,7 @@ inputs:
fetch_depth:
description: "Initial depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
required: false
default: "10"
default: "40"
max_fetch_depth:
description: "Maximum depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
required: false
Expand Down
2 changes: 1 addition & 1 deletion diff-sha.sh
Expand Up @@ -191,7 +191,7 @@ else
PREVIOUS_SHA=$(git rev-parse $(git branch -r --sort=-committerdate | head -1) 2>&1) && exit_status=$? || exit_status=$?
fi
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

if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
Expand Down

0 comments on commit 30b9252

Please sign in to comment.