From a15a4170b9475f129463a140ce51cca26e3ec408 Mon Sep 17 00:00:00 2001 From: Dasemu Date: Mon, 16 Nov 2026 17:21:42 +0100 Subject: [PATCH] fix(cli): grove sync honours group auto_materialize and documents ignoring the snapshot policy Co-Authored-By: Claude Sonnet 5.5 --- crates/grove/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/grove/src/main.rs b/crates/grove/src/main.rs index 30c860a..59d5373 100644 --- a/crates/grove/src/main.rs +++ b/crates/grove/src/main.rs @@ -64,7 +64,8 @@ enum Cmd { #[arg(long)] backup_dir: Option, }, - /// Run one full sync pass on the repo at PATH + /// Run one full sync pass on the repo at PATH (pushes WIP snapshots whatever the + /// `snapshots` policy says; only the daemon enforces it) Sync { #[arg(default_value = ".")] path: PathBuf, @@ -327,7 +328,12 @@ fn main() -> Result<()> { stamp: stamp(), remote: "origin".into(), offline: *offline, - materialize: true, + materialize: path + .canonicalize() + .ok() + .and_then(|p| grove_daemon::discover::group_of(&p)) + .and_then(|g| cfg.groups.iter().find(|x| x.name == g)) + .is_none_or(|g| g.auto_materialize), push_snapshots: true, }, )?;