Skip to content

Commit

Permalink
Fixed bug retrieving the fork point
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Aug 12, 2022
1 parent 96a701d commit cf559bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff-sha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ else
if [[ "$INPUT_USE_FORK_POINT" == "true" ]]; then
echo "::debug::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}" "$(git name-rev --name-only "$CURRENT_SHA")") && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$(git merge-base --fork-point "${TARGET_BRANCH}" "${CURRENT_BRANCH}") && exit_status=$? || exit_status=$?
echo "::debug::Previous SHA: $PREVIOUS_SHA"
else
git fetch --no-tags -u --progress origin --depth=1 "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
Expand Down

0 comments on commit cf559bf

Please sign in to comment.