fix(cli): grove sync honours group auto_materialize and documents ignoring the snapshot policy

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5.5 committed 2026-11-16 17:21:42 +01:00
1 parent 9d1a743073
commit a15a4170b9
1 file changed
+8 -2
+8 -2
View File
@@ -64,7 +64,8 @@ enum Cmd {
#[arg(long)]
backup_dir: Option<PathBuf>,
},
/// 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,
},
)?;