3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-18 13:57:39 +00:00

Update diff-sha.sh

This commit is contained in:
Tonye Jack 2022-11-04 14:41:40 -06:00 committed by GitHub
parent dc104b5c83
commit 0f09389954
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,8 +177,12 @@ else
while ! git merge-base "$TARGET_BRANCH" "$CURRENT_BRANCH" > /dev/null; do
depth=$((depth+1024))
git fetch -q --deepen=$depth origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
if [[ -d .git/shallow ]]; then
git fetch -q --deepth=$depth --unshallow origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
else
git fetch -q --deepth=$depth origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
fi
if [[ $depth -gt 5000 ]]; then
echo "::error::Unable to locate the merge-base for: $TARGET_BRANCH $CURRENT_BRANCH"