Problem
parse_repo_spec strips a trailing .git only for full-URL inputs. The shorthand, host-prefixed, and bare forms keep .git as part of the repo name, which then flows into the host API request:
opensrc github:owner/repo.git → GET https://api.github.com/repos/owner/repo.git → 404 → "Repository "owner/repo.git" not found on GitHub."
So opensrc reports a repo as missing when it actually exists. is_repo_spec accepts owner/repo.git (the .git matches the repo-name regex), so the input is routed to the repo path and then silently fails. It shows up whenever a .git-suffixed clone URL is shortened by hand or copied from a package's repository shorthand.
| Input | repo before | repo after |
|---|---|---|
https://github.com/owner/repo.git | repo ✅ | repo |
github:owner/repo.git | repo.git ❌ | repo |
github.com/owner/repo.git | repo.git ❌ | repo |
owner/repo.git | repo.git ❌ | repo |
Fix
Strip a single trailing .git in the shared spec-parsing tail so all input forms match the full-URL branch. GitHub/GitLab/Bitbucket all forbid repo names ending in .git, so the strip is always safe.
Tests
Added unit tests for the shorthand, bare, host-prefixed, and @ref forms, plus a regression guard for the full-URL form. cargo test, cargo fmt --check, and cargo clippy -- -D warnings all pass.
@Steel-tech is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.