Skip to content

fix(series): Read the GitHub repository out of a remote URL with BSD sed too - #3059

Merged
schochastics merged 1 commit into
mainfrom
fix/cutover-slug-bsd-sed
Dec 4, 2026
Merged

schochastics merged 1 commit into
mainfrom
fix/cutover-slug-bsd-sed

Conversation

@schochastics

Copy link
Copy Markdown
Contributor

github_slug() in scripts/series-cutover.sh turns a remote URL into the owner/repo that the cutover's archive pull requests are opened in. It matched the repository with a lazy [^/]+?, which isn't valid ERE:

  • BSD sed (macOS) rejects it ("repetition-operator operand invalid"), so every remote looks like it isn't on GitHub and the cutover refuses to archive. series-cutover.sh main --prepare shows this today on a Mac.
  • GNU sed reads it greedily and keeps .git in the slug (schochastics/rigraph.git).

The fix strips the optional trailing / and .git in bash, then matches a plain pattern that both seds accept.

The new test section 2b in scripts/series-cutover-test.sh evals the function out of the script and checks the scp, https (with and without .git and a trailing /) and ssh:// forms, plus a non-GitHub URL.

Tested:

  • GNU (Debian container): scripts/series-cutover-test.sh gives 80 passed, 0 failed.
  • macOS: the 6 new checks fail with the old line and pass with the new one. The 40 other failures on macOS are pre-existing and unrelated; --prepare exits 1 there without GNU sort.

🤖 Generated with Claude Code

…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
schochastics merged commit 77cd8bc into main Dec 4, 2026
9 checks passed
@schochastics
schochastics deleted the fix/cutover-slug-bsd-sed branch December 4, 2026 09:35
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant