mirror of
https://github.com/tj-actions/changed-files
synced 2025-02-19 15:23:42 +00:00
Update diff-sha.sh
This commit is contained in:
parent
251c03879a
commit
90a4d2a19b
1 changed files with 3 additions and 3 deletions
|
@ -57,7 +57,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||
if [[ -z $INPUT_SHA ]]; then
|
||||
CURRENT_SHA=$(git rev-list -n 1 HEAD 2>&1) && exit_status=$? || exit_status=$?
|
||||
else
|
||||
git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
|
||||
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
|
||||
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
||||
fi
|
||||
fi
|
||||
|
@ -83,7 +83,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||
exit 1
|
||||
fi
|
||||
else
|
||||
git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
|
||||
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
|
||||
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||
|
||||
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||
|
@ -115,7 +115,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||
PREVIOUS_SHA=$INPUT_BASE_SHA
|
||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||
CURRENT_BRANCH=$TARGET_BRANCH
|
||||
git fetch --no-tags -u --progress --depth="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
|
||||
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH" origin "$CURRENT_BRANCH":"$CURRENT_BRANCH"
|
||||
fi
|
||||
|
||||
echo "::debug::Target branch $TARGET_BRANCH..."
|
||||
|
|
Loading…
Add table
Reference in a new issue