NeogitOrg / neogit

An interactive and powerful Git interface for Neovim, inspired by Magit
MIT License
3.86k stars 227 forks source link

Fix issue where owner and repo have special characters. #1203

Closed theherk closed 6 months ago

theherk commented 6 months ago

988b2869 introduced a regression where special characters prevented making complete matches. This changes those match patterns to all non-slash characters rather than word characters.

Verification output ```bash { host = "github.com", owner = "owner-with-dash", proto = "git", repo = "repo", repository = "repo", url = "git@github.com:owner-with-dash/repo.git", user = "git" } { host = "github.com", owner = "owner", proto = "git", repo = "repo-with-dash", repository = "repo-with-dash", url = "git@github.com:owner/repo-with-dash.git", user = "git" } ```
CKolkey commented 6 months ago

I added a spec file with all the examples you posted in the original PR - do you mind adding these two test cases? https://github.com/NeogitOrg/neogit/blob/b52d7c5dd2608ea920ec3f39d08308150abd11da/tests/specs/neogit/lib/git/remote_spec.lua#L1

theherk commented 6 months ago

I added a spec file with all the examples you posted in the original PR - do you mind adding these two test cases?

Yeah, no sweat. They're added.

CKolkey commented 6 months ago

Great! Thanks for catching that :)