The intention is to remove the .git that may be added to, e.g., GitHub repository URLs. If there's a /v2 or similar after, then we want to match a slash with the suffix. If the suffix is at the end, then the earlier code would have appended a slash anyway, and so we still want to match a slash.
Allowing .git without slash incorrectly catches things like the middle of code.gitea.com. Fixes #32
The intention is to remove the
.gitthat may be added to, e.g., GitHub repository URLs. If there's a/v2or similar after, then we want to match a slash with the suffix. If the suffix is at the end, then the earlier code would have appended a slash anyway, and so we still want to match a slash.Allowing
.gitwithout slash incorrectly catches things like the middle ofcode.gitea.com. Fixes #32