mirror of
https://github.com/tj-actions/changed-files
synced 2025-02-07 05:33:52 +00:00
Update diff-sha.sh
This commit is contained in:
parent
dc104b5c83
commit
0f09389954
1 changed files with 6 additions and 2 deletions
|
@ -178,7 +178,11 @@ else
|
||||||
while ! git merge-base "$TARGET_BRANCH" "$CURRENT_BRANCH" > /dev/null; do
|
while ! git merge-base "$TARGET_BRANCH" "$CURRENT_BRANCH" > /dev/null; do
|
||||||
depth=$((depth+1024))
|
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
|
if [[ $depth -gt 5000 ]]; then
|
||||||
echo "::error::Unable to locate the merge-base for: $TARGET_BRANCH $CURRENT_BRANCH"
|
echo "::error::Unable to locate the merge-base for: $TARGET_BRANCH $CURRENT_BRANCH"
|
||||||
|
|
Loading…
Add table
Reference in a new issue