Repository navigation
fix(series): Read the GitHub repository out of a remote URL with BSD sed too - #3059
Merged
Merged
Conversation
…sed too `github_slug()` matched the repository with a lazy `[^/]+?`, which is no ERE: BSD sed refuses it, so on macOS every remote looked like it was not on GitHub and the cutover's archive step refused to run; GNU sed reads it greedily and keeps `.git` in the slug. Strip the optional `/` and `.git` first and match a plain pattern, and test the URL forms git and `gh` write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schochastics
added a commit
to schochastics/rigraph
that referenced
this pull request
Dec 4, 2026
…sed too (igraph#3059) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 77cd8bc)
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.
github_slug()inscripts/series-cutover.shturns a remote URL into theowner/repothat the cutover's archive pull requests are opened in. It matched the repository with a lazy[^/]+?, which isn't valid ERE:series-cutover.sh main --prepareshows this today on a Mac..gitin the slug (schochastics/rigraph.git).The fix strips the optional trailing
/and.gitin bash, then matches a plain pattern that both seds accept.The new test section 2b in
scripts/series-cutover-test.shevals the function out of the script and checks the scp, https (with and without.gitand a trailing/) andssh://forms, plus a non-GitHub URL.Tested:
scripts/series-cutover-test.shgives 80 passed, 0 failed.--prepareexits 1 there without GNUsort.🤖 Generated with Claude Code