From 96a52c9e2fdf6ff2f979afd1c5301cf004da33fb Mon Sep 17 00:00:00 2001 From: Lewis Date: Mon, 11 May 2026 13:02:41 +0300 Subject: [PATCH] knotserver: just continue if orphan repo, don't abort Lewis: May this revision serve well! --- hook/setup.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hook/setup.go b/hook/setup.go index 20272226..e39ae0b8 100644 --- a/hook/setup.go +++ b/hook/setup.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io/fs" + "log/slog" "os" "path/filepath" "strings" @@ -74,6 +75,10 @@ func Setup(config config) error { userPath := filepath.Join(config.scanPath, did) if err := SetupRepo(config, userPath); err != nil { + if errors.Is(err, ErrNoGitRepo) { + slog.Warn("hook setup: skipping non-repo entry", "path", userPath, "err", err) + continue + } return err } } -- 2.51.2