Skip to content

Commit

Permalink
zoekt-indexserver: handle gerrit-mirror RepoNameFormat config (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-calland authored May 3, 2024
1 parent 69068bf commit 647e86c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/zoekt-indexserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type ConfigEntry struct {
Active bool
NoArchived bool
GerritFetchMetaConfig bool
GerritRepoNameFormat string
}

func randomize(entries []ConfigEntry) []ConfigEntry {
Expand Down Expand Up @@ -260,8 +261,11 @@ func executeMirror(cfg []ConfigEntry, repoDir string, pendingRepos chan<- string
if c.Active {
cmd.Args = append(cmd.Args, "-active")
}
if c.GerritFetchMetaConfig {
if c.GerritFetchMetaConfig {
cmd.Args = append(cmd.Args, "-fetch-meta-config")
}
if c.GerritRepoNameFormat != "" {
cmd.Args = append(cmd.Args, "-repo-name-format", c.GerritRepoNameFormat)
}
cmd.Args = append(cmd.Args, c.GerritApiURL)
} else {
Expand Down

0 comments on commit 647e86c

Please sign in to comment.