fix: skip nightly-testing merge when branch does not exist#13308
Merged
fix: skip nightly-testing merge when branch does not exist#13308
Conversation
When a release repo has no nightly-testing branch, `git merge origin/nightly-testing` fails with "not something we can merge" and the error handler misinterprets this as a merge conflict, then crashes trying to commit with nothing to commit. Check for the branch with `git ls-remote` before attempting the merge. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d9c8758 to
f8f6e27
Compare
This PR switches from `git ls-remote --heads origin nightly-testing` (which does substring pattern matching and could match e.g. `refs/heads/foo/nightly-testing`) to `git show-ref --verify --quiet` on the local tracking ref after fetch, which is an exact match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
wkrozowski
pushed a commit
to wkrozowski/lean4
that referenced
this pull request
Apr 10, 2026
…r#13308) This PR makes `release_steps.py` robust to release repos that have no `nightly-testing` branch. Previously, `git merge origin/nightly-testing` would fail with "not something we can merge" and the error handler misinterpreted this as a merge conflict, then crashed trying to commit with nothing to commit. Now we check for the branch with `git ls-remote --heads` before attempting the merge. 🤖 Prepared with Claude Code --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
volodeyka
pushed a commit
that referenced
this pull request
Apr 16, 2026
This PR makes `release_steps.py` robust to release repos that have no `nightly-testing` branch. Previously, `git merge origin/nightly-testing` would fail with "not something we can merge" and the error handler misinterpreted this as a merge conflict, then crashed trying to commit with nothing to commit. Now we check for the branch with `git ls-remote --heads` before attempting the merge. 🤖 Prepared with Claude Code --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
This PR makes
release_steps.pyrobust to release repos that have nonightly-testingbranch. Previously,git merge origin/nightly-testingwould fail with "not something we can merge" and the error handler
misinterpreted this as a merge conflict, then crashed trying to commit
with nothing to commit. Now we check for the branch with
git ls-remote --headsbefore attempting the merge.🤖 Prepared with Claude Code