Skip to content

Commit 8ea687a

Browse files
committed
cli: log repositories found on startup
Signed-off-by: Javi Fontan <[email protected]>
1 parent b1f3ca3 commit 8ea687a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cmd/gitbase/command/server.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,16 @@ 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+
298+
return repos.ForEach(func(r borges.Repository) error {
299+
id := r.ID().String()
300+
logrus.WithField("id", id).Debug("repository added")
301+
return r.Close()
302+
})
294303
}
295304

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

0 commit comments

Comments
 (0)