aboutsummaryrefslogtreecommitdiff
path: root/internal/rtree
diff options
context:
space:
mode:
Diffstat (limited to 'internal/rtree')
-rw-r--r--internal/rtree/index.go4
1 files changed, 2 insertions, 2 deletions
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
}