Skip to content

gitserver: Avoid redundant URL parsing

Warren Gifford requested to merge core/gitserver-vcs-url into main

Created by: tsenart

This commit changes a few interfaces and signatures in gitserver to deal with a remoteURL *url.URL instead of a bare string, which we were ultimately parsing multiple times.

It also introduces a ParseURL function in the vcs package which works with all git URL types as well as our custom perforce:// URL scheme.

This paves the way to avoid yet another URL parsing instance in an upcoming ParseGitCredentials function call that will be used to authenticate git commands using the git credential helper protocol.

Part of #18054

Merge request reports

Loading