3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2024-12-17 13:47:20 +00:00

Updated to increase shallow clone depth

This commit is contained in:
Tonye Jack 2022-11-03 10:10:27 -06:00
parent 764c279509
commit f390b8d769

View file

@ -135,7 +135,7 @@ else
if [[ -z $INPUT_BASE_SHA ]]; then if [[ -z $INPUT_BASE_SHA ]]; then
git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$TARGET_BRANCH":"$TARGET_BRANCH" git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$TARGET_BRANCH":"$TARGET_BRANCH"
git fetch --no-tags -u --progress --deepen=40000 origin "$CURRENT_BRANCH":"$GITHUB_HEAD_REF" git fetch --no-tags -u --progress --deepen=40000
PREVIOUS_SHA=$(git rev-list --no-merges -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$? PREVIOUS_SHA=$(git rev-list --no-merges -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
if [[ -z "$PREVIOUS_SHA" ]]; then if [[ -z "$PREVIOUS_SHA" ]]; then
@ -144,7 +144,7 @@ else
echo "::debug::Previous SHA: $PREVIOUS_SHA" echo "::debug::Previous SHA: $PREVIOUS_SHA"
else else
git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$? git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$?
git fetch --no-tags -u --progress --deepen=40000 origin "$CURRENT_BRANCH":"$GITHUB_HEAD_REF" git fetch --no-tags -u --progress --deepen=40000
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$? PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
fi fi