inboxes can only merge to Todo because tempfiles only have Todo
This commit is contained in:
@@ -158,11 +158,12 @@ func copyTodoToDir(d string, filepaths []string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
subroot, err := pttodo.NewRootFromFile(inbox)
|
||||
inboxRoot, err := pttodo.NewRootFromFile(inbox)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
root.MergeIn(subroot)
|
||||
root.MergeIn(pttodo.Root{Todo: inboxRoot.Todo})
|
||||
root.MergeIn(pttodo.Root{Todo: inboxRoot.Scheduled})
|
||||
|
||||
if b, err := yaml.Marshal(root.Todo); err != nil {
|
||||
return err
|
||||
|
||||
5
cmd/testdata/root.yaml
vendored
5
cmd/testdata/root.yaml
vendored
@@ -1,5 +1,8 @@
|
||||
todo:
|
||||
- root
|
||||
- stub
|
||||
scheduled: []
|
||||
scheduled:
|
||||
- todo: abc
|
||||
schedule: "2024-01-01"
|
||||
ts: Thu Nov 9 07:49:59 MST 2023
|
||||
done: []
|
||||
|
||||
Reference in New Issue
Block a user