Skip to content

Commit ca909f1

Browse files
committed
Revert "Fix problem with fetch depth of 0"
This reverts commit 49f82a1.
1 parent 538caf1 commit ca909f1

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ jobs:
183183
steps:
184184
- uses: actions/checkout@v4
185185
with:
186-
# Required because otherwise there are always changes detected when executing diff/rev-list
187-
fetch-depth: 0
188186
# If no PAT is used the following error occurs on a push:
189187
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
190188
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
@@ -210,7 +208,7 @@ jobs:
210208
211209
echo "Checking if update-branch-merged exists"
212210
git fetch
213-
if [[ $(git ls-remote --exit-code --heads origin ${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
211+
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
214212
echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing"
215213
exit 0
216214
fi
@@ -271,11 +269,8 @@ jobs:
271269
base_branch=$(git branch --show-current)
272270
echo "Base branch is $base_branch"
273271
274-
echo "Fully fetching..."
275-
git fetch --unshallow || true
276-
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
277-
git fetch origin
278-
272+
echo "Fetching..."
273+
git fetch
279274
if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then
280275
echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing"
281276
exit 0

0 commit comments

Comments
 (0)