Skip to content

Allow slashes in extra-packages refs - #306

Merged
deathaxe merged 1 commit into
SublimeText:masterfrom
rchl:extra-packages-slash-refs
Oct 20, 2026
Merged

deathaxe merged 1 commit into
SublimeText:masterfrom
rchl:extra-packages-slash-refs

Conversation

@rchl

@rchl rchl commented Oct 19, 2026

Copy link
Copy Markdown
Member

The groups for the user and the package name in the extra-packages regexes were greedy, so they matched up to the last / in the line. When the ref contains a slash, the line is split in the wrong place:

Line Before After
sublimelsp/LSP@feat/foo user sublimelsp/LSP@feat, repo foo, no ref user sublimelsp, repo LSP, ref feat/foo
LSP:sublimelsp/LSP@feat/foo package LSP, user sublimelsp/LSP@feat, repo foo, no ref package LSP, user sublimelsp, repo LSP, ref feat/foo

The package name now stops at the first : or /, and the user at the first /, so the ref is everything after the first @. Lines without a slash in the ref parse as before, including A File Icon:SublimeText/AFileIcon@st3-, SublimeText/UnitTesting and plain package names for Package Control.

I ran the loop from action.yaml under bash with InstallPackage stubbed for these cases, and checked that gitResolvePrefixToTag resolves a real branch with a slash (chore/guard-against-plugin-exceptions on sublimelsp/LSP), since its sed uses % as the delimiter.

The greedy user and package groups matched up to the last slash, so
`sublimelsp/LSP@feat/foo` was parsed as the repository foo of the user
`sublimelsp/LSP@feat`. Stop them at the first slash and colon, so that
the ref is everything after the first @.
@deathaxe
deathaxe merged commit e12fa5b into SublimeText:master Oct 20, 2026
21 checks passed
@rchl
rchl deleted the extra-packages-slash-refs branch October 20, 2026 07:02
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.

2 participants