Fix remote filtering

This commit is contained in:
Ryan McGuire 2024-01-18 12:04:06 -05:00
parent d6b93a5db7
commit f25b3e0123

View File

@ -22,7 +22,7 @@ func (c *Cache) LoadRemotes(gitRemotes ...string) {
c.log.Error("Skipping load of remote, not alive", c.log.Args(
"remote", r.String()))
continue
} else if !slices.Contains(gitRemotes, r.GetInfo().Host) {
} else if len(gitRemotes) > 0 && !slices.Contains(gitRemotes, r.GetInfo().Host) {
c.log.Debug("Skipping remote not in --remote list", c.log.Args(
"remote", r.String(),
"remotes", gitRemotes))