Skip to content

Commit

Permalink
Update cmd/zoekt-mirror-gerrit/main.go
Browse files Browse the repository at this point in the history
Co-authored-by: Keegan Carruthers-Smith <[email protected]>
  • Loading branch information
xavier-calland and keegancsmith committed Apr 29, 2024
1 parent ff1130d commit c803b27
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmd/zoekt-mirror-gerrit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,8 @@ func configureGitCredential(rootURL *url.URL, projectURL string, dest string) ma
}
}

func anonymousURL(URL *url.URL) string {
anonymousURL := *URL
if _, has := URL.User.Password(); has {
anonymousURL.User = nil
}
return (&anonymousURL).String()
func anonymousURL(u *url.URL) string {
anon := *u
anon.User = nil
return anon.String()
}

0 comments on commit c803b27

Please sign in to comment.