aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-06-21 18:17:12 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-06-21 18:17:12 +0200
commitc455e58af0da900ac8b259cef7496490d487afd1 (patch)
tree05bd81d55edcf47584890af1985d020c049a14e0 /internal
parent08b382b4ee3383e3f8a04c59e08cf074ab5ac4ce (diff)
downloadgofu-c455e58af0da900ac8b259cef7496490d487afd1.tar.gz
rtree: fix index failing on existing repos that are not indexedHEADmain
Diffstat (limited to 'internal')
-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
}