fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

zoekt-mirror-gerrit: Don't remove /a/ prefix from git clone URLs (#990)

The /a/ prefix is required for authenticated git operations in default Gerrit
configurations. Gerrit's HttpScheme intentionally includes /a/ in clone URLs
to trigger authentication. Removing it breaks instances using default config.

The ServerInfo API already returns the correct URL format based on the
instance's configuration, so we should use it as-is.

Amp-Thread-ID: https://ampcode.com/threads/T-6944ab20-837d-4e78-a9ad-51083263baec
Co-authored-by: Amp <amp@ampcode.com>

author
Keegan Carruthers-Smith
co-author
Amp
committer
GitHub
date (Nov 11, 2025, 9:23 AM +0200) commit 46f7ba34 parent 7236a5dd
-2
-2
cmd/zoekt-mirror-gerrit/main.go
··· 147 147 projectURL = schemeInfo.URL 148 148 if s == "http" && schemeInfo.IsAuthRequired { 149 149 projectURL = addPassword(projectURL, rootURL.User) 150 - // remove "/a/" prefix needed for API call with basic auth but not with git command → cleaner repo name 151 - projectURL = strings.Replace(projectURL, "/a/${project}", "/${project}", 1) 152 150 } 153 151 break 154 152 }