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
17ae17127c
commit
8fb90ed7f6
1 changed files with 6 additions and 2 deletions
|
@ -205,6 +205,10 @@ else
|
|||
fi
|
||||
else
|
||||
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
|
||||
PREVIOUS_SHA=$(git merge-base "$PREVIOUS_SHA" "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||
|
@ -217,10 +221,10 @@ else
|
|||
max_depth=$INPUT_MAX_FETCH_DEPTH
|
||||
|
||||
for ((i=0; i<max_depth; i+=depth)); do
|
||||
echo "Fetching $depth commits..."
|
||||
echo "Fetching $i commits..."
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
git fetch $EXTRA_ARGS -u --progress --deepen="$depth" origin "$CURRENT_BRANCH"
|
||||
git fetch $EXTRA_ARGS -u --progress --deepen="$i" origin "$CURRENT_BRANCH"
|
||||
|
||||
if git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue