Skip to content

Commit 35d6bc7

Browse files
authored
cli: log repositories found on startup (#893)
cli: log repositories found on startup
2 parents 7bd4533 + aa7dd37 commit 35d6bc7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cmd/gitbase/command/server.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,17 @@ func (c *Server) addDirectories() error {
290290
}
291291
}
292292

293-
return nil
293+
repos, err := c.rootLibrary.Repositories(borges.ReadOnlyMode)
294+
if err != nil {
295+
return err
296+
}
297+
defer repos.Close()
298+
299+
return repos.ForEach(func(r borges.Repository) error {
300+
id := r.ID().String()
301+
logrus.WithField("id", id).Debug("repository added")
302+
return r.Close()
303+
})
294304
}
295305

296306
func (c *Server) addDirectory(d directory) error {

0 commit comments

Comments
 (0)