Update diff-sha.sh
This commit is contained in:
parent
8b8c347ee9
commit
1ae6035162
@ -160,11 +160,11 @@ else
|
|||||||
|
|
||||||
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch -u --progress $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null
|
git fetch -u --progress $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null 2>&1
|
||||||
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 2>/dev/null || true
|
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 1>/dev/null 2>&1 || true
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch $EXTRA_ARGS -u --progress --depth="$INPUT_FETCH_DEPTH" origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH"
|
git fetch $EXTRA_ARGS -u --progress --depth="$INPUT_FETCH_DEPTH" origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH" 1>/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
@ -224,7 +224,7 @@ else
|
|||||||
echo "Fetching $i commits..."
|
echo "Fetching $i commits..."
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch $EXTRA_ARGS -u --progress --depth="$i" origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH"
|
git fetch $EXTRA_ARGS -u --progress --depth="$i" origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH" 1>/dev/null 2>&1
|
||||||
|
|
||||||
if git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
if git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user