mirror-from-saltstack-salt: fix prune pattern (was matching nothing) - #70028
Merged
Conversation
… nothing The prune step added in saltstack#70027 used pattern 'refs/pull/*' with git for-each-ref, which returns zero refs (the '*' wildcard is not interpreted as glob in for-each-ref pattern arguments — it's a literal). Result: the prune was a no-op; refs/pull/* still enumerated on push; HTTP 408 still occurring on mirror runs. Correct syntax is the prefix without wildcard: `refs/pull/`. Same idiom already used in the `before` and `after` count lines around it. Verified locally: with the fix, refs/pull/ pruned 48905 → 0, and the push --mirror completed in 0.686 seconds (vs ~19 minutes previously).
This was referenced Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
One-character fix to the prune step added in #70027. The pattern
'refs/pull/*'used withgit for-each-refmatches zero refs — the*wildcard is treated as a literal, not a glob, infor-each-refpattern arguments. The prune was a no-op,refs/pull/*still enumerated on push, and the HTTP 408 problem #70027 was meant to solve was still happening.Correct syntax is the prefix without wildcard:
refs/pull/. Same form already used in thebeforeandaftercount lines directly adjacent.Verification
Verified locally against a fresh
git clone --bare --mirrorofsaltstack/salt:With buggy pattern (current merged version of #70027):
With fix:
Impact if not merged
The salt-nightlies mirror cron will fail nightly with HTTP 408 (same as before #70027 attempted a fix). The mirror still achieves ref sync at the git level (verified — master SHAs matched on both sides after the 408), so it's a workflow-ergonomics and runtime issue, not a data-correctness one. But nightly runs will always appear red.
Merge requirements satisfied?
Commits signed with GPG?
No.