fix(release): realign tracking refs after token-URL pushes - #669
Merged
Conversation
A push through the x-access-token URL does not update origin's remote-tracking refs, so the tap later looks out of date and `brew update` rebases it onto a remote that already contains the pushed commits, conflicting on Formula/gnash.rb (as happened cutting 2.1.3). Fetch origin after such a push to realign.
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.
Summary
Cutting 2.1.3, the release run died mid-pipeline:
brew's auto-update rebased the tap onto its remote and conflicted onFormula/gnash.rb. Root cause:git_pushpushes through anx-access-tokenURL, which never updatesorigin's remote-tracking refs, so after a release the tap (and main repo) permanently look out of date to any subsequentgit pull --rebase— including the onebrew updateruns on taps.This adds a
git fetch -q originafter every token-URL push ingit_push, keeping the tracking refs aligned with what was just pushed. Failure of the fetch is non-fatal (|| true) — it's housekeeping, not part of the release.Testing
bash -n scripts/release.shpasses.git fetch originin the tap after the 2.1.3 release broughtmain...origin/mainback in sync, which is exactly the state this keeps automatically.🤖 Generated with Claude Code