Dough Git

commit

Fix ref glob so pull-ref deletion actually matches

commit
48df0a6adbae0d87c81789e96de52cf310a4eb4a
author
Clove Twilight <[email protected]>
date
2026-09-17 04:12
refs/pull/* only matches one path segment in for-each-ref, so
refs/pull/N/head never matched and the deletion loop was a no-op.
Use refs/pull/*/head (and /merge, in case it's ever exposed) instead.

Co-Authored-By: Claude Sonnet 5 <[email protected]>

diff --git a/.github/workflows/codeberg.yml b/.github/workflows/codeberg.yml
index 81b9e32..3dcc9c9 100644
--- a/.github/workflows/codeberg.yml
+++ b/.github/workflows/codeberg.yml
@@ -58,7 +58,7 @@ jobs:
 
           # GitHub's synthetic refs/pull/* refs live in a hidden namespace on
           # Codeberg/Gitea and are always rejected, so drop them before mirroring.
-          for ref in $(git for-each-ref --format='%(refname)' 'refs/pull/*'); do
+          for ref in $(git for-each-ref --format='%(refname)' 'refs/pull/*/head' 'refs/pull/*/merge'); do
             git update-ref -d "$ref"
           done