summaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-04-22 17:10:26 +0200
committerewy <ewy0@protonmail.com>2026-04-22 17:10:26 +0200
commitd398497d81f09b3011d52ff78a42f9b67d93aaee (patch)
tree50f93dc7bb2dec508625ce1f11ae08b80cc9972b /model
parent5595ded1f2a31d6bc0f924d977553c36059ce5de (diff)
store whether --all is enabled in the state
Diffstat (limited to 'model')
-rw-r--r--model/new.go5
-rw-r--r--model/state.go1
2 files changed, 5 insertions, 1 deletions
diff --git a/model/new.go b/model/new.go
index cddb404..8dd0ca4 100644
--- a/model/new.go
+++ b/model/new.go
@@ -4,6 +4,7 @@ import (
"errors"
"io/fs"
"path/filepath"
+ "pik/flags"
"pik/identity"
"strings"
"sync"
@@ -11,7 +12,9 @@ import (
func NewState(f fs.FS, locations []string, indexers []Indexer, runners []Runner) (*State, []error) {
var errs []error
- st := &State{}
+ st := &State{
+ All: *flags.All,
+ }
wg := sync.WaitGroup{}
var sources = make([]*Source, len(locations), len(locations))
for i, loc := range locations {
diff --git a/model/state.go b/model/state.go
index 96da3eb..3ba2045 100644
--- a/model/state.go
+++ b/model/state.go
@@ -2,6 +2,7 @@ package model
type State struct {
Sources []*Source
+ All bool
}
type HydratedState struct {