mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-17 13:47:20 +00:00
Update diff-sha.sh
This commit is contained in:
parent
7f75cdb504
commit
237b05158c
1 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ else
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch $EXTRA_ARGS -u --progress --depth=$(( GITHUB_EVENT_PULL_REQUEST_COMMITS + 1 )) origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH" 1>/dev/null 2>&1
|
git fetch $EXTRA_ARGS -u --progress --depth=$(( GITHUB_EVENT_PULL_REQUEST_COMMITS + 1 )) origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH" 1>/dev/null 2>&1
|
||||||
|
|
||||||
COMMON_ANCESTOR=$(git rev-list --ancestry-path "$GITHUB_REF".."$TARGET_BRANCH") && exit_status=$? || exit_status=$?
|
COMMON_ANCESTOR=$(git merge-base --fork-point "$TARGET_BRANCH" HEAD) && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ -z "$COMMON_ANCESTOR" ]]; then
|
if [[ -z "$COMMON_ANCESTOR" ]]; then
|
||||||
echo "::debug::Unable to locate a common ancestor for the current branch: $CURRENT_BRANCH"
|
echo "::debug::Unable to locate a common ancestor for the current branch: $CURRENT_BRANCH"
|
||||||
|
@ -227,7 +227,7 @@ else
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||||
|
|
||||||
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
PREVIOUS_SHA=$(git merge-base "$TARGET_BRANCH" "$CURRENT_SHA") && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$(git merge-base --fork-point "$TARGET_BRANCH" "$CURRENT_SHA") && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue