git
git copied to clipboard
Fixes incorrect URL for submodules that specify the remote port
If the repo's host is in urlPrefix, test if there is a number after the ":" and, if there is one, consider it as a port number and ignore it in the URL returned.
Fixes go-gitea/gitea#2775
@Governa if you could add some tests, it's better!
What is my username is 1234
? 🤔 [email protected]:1234/my_project.git
should still validate to 1234/my_project.git