summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-04-16 22:48:32 +0200
committerewy <ewy0@protonmail.com>2026-04-16 22:48:32 +0200
commitfbdc2b9d849913ccf8dd7a9001012ce2d28cbd2f (patch)
treef2e08dfcae638a42424742d914053ce2607ab76a /main.go
parent6a22a1ee7bfd1fbd34486a224db98eb6aead5c3e (diff)
when reindexing in --all, only index "added" sources
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index d44272d..d12f203 100644
--- a/main.go
+++ b/main.go
@@ -40,6 +40,7 @@ var hydrators = []model.Hydrator{
}
var ForceConfirm = false
+var SourcesWithoutResults cache.Cache
//go:embed version.txt
var version string
@@ -79,10 +80,12 @@ func main() {
var st *model.State
var stateErrors []error
+ var c cache.Cache
if !*flags.All {
st, stateErrors = model.NewState(fs, locs, indexers, runners)
} else {
- c, err := cache.Load()
+ c, err = cache.Load()
+ c.Strip(SourcesWithoutResults)
if err != nil {
_, _ = spool.Warn("%v\n", err)
os.Exit(1)
@@ -136,6 +139,7 @@ func main() {
_, _ = spool.Warn("%v\n", err)
os.Exit(1)
}
+ SourcesWithoutResults = c
main()
return
}