Skip to content

gitserver: support suffix .git for go modules

Administrator requested to merge sh/normalize-repo into main

Created by: stefanhengl

With this change we don't remove the suffix ".git" if the code host is a go module proxy.

Go supports module names with suffix ".git", see for example git.apache.org/thrift.git (sourcegraph, pkg.go.dev). So far, we removed the suffix for all code hosts during normalization, which meant we weren't able to clone thrift.git.

Test plan

  • Unit tests
  • I ran a local instance of Sourcegraph and confirmed that thrift.git, as a dependency, is now clonable and searchable.

Merge request reports

Loading