From c455e58af0da900ac8b259cef7496490d487afd1 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Sun, 21 Jun 2026 18:17:12 +0200 Subject: rtree: fix index failing on existing repos that are not indexed --- internal/rtree/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/rtree') diff --git a/internal/rtree/index.go b/internal/rtree/index.go index 1f6799d..2b6a0a8 100644 --- a/internal/rtree/index.go +++ b/internal/rtree/index.go @@ -190,8 +190,8 @@ func (i *Index) Rebuild() error { repo, exists := existingRepos[newRepo.CheckoutPath] // if a repo has no remotes, repo is nil which rtree cannot parse back and doesn't make sense to add anyway - if repo == nil || repo.Remotes == nil { - fmt.Printf("repository %s has no remotes; skipping", filepath.Join(RootPath, newRepo.CheckoutPath)) + if exists && repo.Remotes == nil { + fmt.Printf("repository %s has no remotes; skipping\n", filepath.Join(RootPath, newRepo.CheckoutPath)) return nil } -- cgit v1.3.1