3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-01-29 03:34:50 +00:00

Update diff-sha.sh

This commit is contained in:
Tonye Jack 2022-11-04 14:17:10 -06:00 committed by GitHub
parent 133f857c90
commit ac72938f3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -179,13 +179,13 @@ else
while ! git merge-base $TARGET_BRANCH $CURRENT_BRANCH > /dev/null; do
depth=$((depth+1024))
git fetch -q --deepen=$depth origin "$TARGET_BRANCH" "$CURRENT_BRANCH"
git fetch -q --deepen=$depth origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
if [[ $depth -gt 5000 ]];
if [[ $depth -gt 5000 ]]; then
echo "::error::Unable to locate the merge-base for: $TARGET_BRANCH $CURRENT_BRANCH"
echo "::error::Please verify that both commits are valid, and increase the fetch_depth to a number higher than $INPUT_FETCH_DEPTH."
exit 1
then
fi
done
echo "::debug::Target branch: $TARGET_BRANCH"