mirror of
https://github.com/Dasemu/Grove.git
synced 2026-11-27 07:46:13 +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)]
|
#[arg(long)]
|
||||||
backup_dir: Option<PathBuf>,
|
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 {
|
Sync {
|
||||||
#[arg(default_value = ".")]
|
#[arg(default_value = ".")]
|
||||||
path: PathBuf,
|
path: PathBuf,
|
||||||
@@ -327,7 +328,12 @@ fn main() -> Result<()> {
|
|||||||
stamp: stamp(),
|
stamp: stamp(),
|
||||||
remote: "origin".into(),
|
remote: "origin".into(),
|
||||||
offline: *offline,
|
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,
|
push_snapshots: true,
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
|
|||||||
Reference in new issue
Block a user