Skip to content

Commit 647e86c

Browse files
zoekt-indexserver: handle gerrit-mirror RepoNameFormat config (#772)
1 parent 69068bf commit 647e86c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/zoekt-indexserver/config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type ConfigEntry struct {
5151
Active bool
5252
NoArchived bool
5353
GerritFetchMetaConfig bool
54+
GerritRepoNameFormat string
5455
}
5556

5657
func randomize(entries []ConfigEntry) []ConfigEntry {
@@ -260,8 +261,11 @@ func executeMirror(cfg []ConfigEntry, repoDir string, pendingRepos chan<- string
260261
if c.Active {
261262
cmd.Args = append(cmd.Args, "-active")
262263
}
263-
if c.GerritFetchMetaConfig {
264+
if c.GerritFetchMetaConfig {
264265
cmd.Args = append(cmd.Args, "-fetch-meta-config")
266+
}
267+
if c.GerritRepoNameFormat != "" {
268+
cmd.Args = append(cmd.Args, "-repo-name-format", c.GerritRepoNameFormat)
265269
}
266270
cmd.Args = append(cmd.Args, c.GerritApiURL)
267271
} else {

0 commit comments

Comments
 (0)