mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-26 07:16:11 +00:00
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:
1 parent
9d1a743073
commit
a15a4170b9
1 file changed
+8
-2
@@ -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,
|
||||
},
|
||||
)?;
|
||||
|
||||
Reference in new issue
Block a user