Skip to content

Commit 538caf1

Browse files
committed
Revert "Fully unshallow every as ls-remote also fails"
This reverts commit 1b8b6b2.
1 parent 1b8b6b2 commit 538caf1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/update-from-template.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ jobs:
209209
echo "Checking if PR can be auto-merged. Try: $i"
210210
211211
echo "Checking if update-branch-merged exists"
212-
git fetch --unshallow && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true
213-
git fetch origin
214-
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
212+
git fetch
213+
if [[ $(git ls-remote --exit-code --heads origin ${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
215214
echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing"
216215
exit 0
217216
fi
@@ -273,7 +272,8 @@ jobs:
273272
echo "Base branch is $base_branch"
274273
275274
echo "Fully fetching..."
276-
git fetch --unshallow && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true
275+
git fetch --unshallow || true
276+
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
277277
git fetch origin
278278
279279
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then

0 commit comments

Comments
 (0)