pub struct SyncArgs {Show 14 fields
pub recursive: bool,
pub pack_root: Option<PathBuf>,
pub workspace: Option<PathBuf>,
pub dry_run: bool,
pub quiet: bool,
pub no_validate: bool,
pub ref_override: Option<String>,
pub only: Vec<String>,
pub force: bool,
pub force_prune: bool,
pub force_prune_with_ignored: bool,
pub quarantine: bool,
pub parallel: Option<u32>,
pub retain_days: Option<u32>,
}Fields§
§recursive: boolRecurse into child packs.
pack_root: Option<PathBuf>Pack root. Directory holding .grex/pack.yaml, or the YAML file
itself. When omitted, sync prints the legacy M1 stub and exits 0.
workspace: Option<PathBuf>Override the workspace root. Defaults to the pack root directory
(where .grex/pack.yaml lives). When set, this path becomes the
canonical meta directory: children resolve parent-relatively as
<workspace>/<child.path>. The path MUST exist; symlinks are
resolved to their canonical inode (logged as workspace: <input> → <canonical> when it differs).
dry_run: boolPlan actions without touching the filesystem.
quiet: boolSuppress per-action log lines.
no_validate: boolSkip plan-phase validators. Debug-only escape hatch.
ref_override: Option<String>Override the default ref for every pack in this sync invocation. Accepts a branch, tag, or commit SHA. Empty strings are rejected.
only: Vec<String>Restrict sync to packs whose workspace-relative path (or name)
matches the glob. Repeat the flag to OR-combine multiple patterns
(standard */**/? semantics). Non-matching packs are skipped
entirely — no action execution, no lockfile write.
force: boolRe-execute every pack even when its actions_hash is unchanged
from the prior lockfile. Overrides the M4-B skip-on-hash
short-circuit; dry-run semantics are unchanged.
force_prune: boolv1.2.0 Stage 1.l — Override Phase 2 prune-safety refusal for
dirty (tracked or untracked-non-ignored) working trees. Still
refuses ignored content unless --force-prune-with-ignored is
also set. Never overrides GitInProgress (mid-rebase / merge /
cherry-pick / revert / bisect).
force_prune_with_ignored: boolv1.2.0 Stage 1.l — Strongest prune override. Implies
--force-prune and additionally drops trees whose only dirt is
in --ignored paths (build artefacts, target/, node_modules/).
Never overrides GitInProgress.
quarantine: boolv1.2.1 Item 5b — Recursively snapshot Phase 2 prune targets to
<meta>/.grex/trash/<ISO8601>/<basename>/ BEFORE deletion.
Audit log entry (QuarantineStart) is appended + fsync’d
before any byte is copied; on snapshot failure the prune
aborts and the original dest is left intact for forensics.
Requires --force-prune or --force-prune-with-ignored —
quarantine only applies to overridden prunes; clean-consent
prunes still go through the direct-unlink fast path. The
“requires one of” check is enforced in the verb handler
(see crates/grex/src/cli/verbs/sync.rs) since clap’s
requires/required_unless_present_any semantics don’t
model “X requires (A or B)” cleanly without an ArgGroup.
Matches Lean theorem quarantine_snapshot_precedes_delete.
parallel: Option<u32>Max parallel pack ops during this sync run (feat-m6-1).
Semantics:
- Absent → default
num_cpus::get()resolved inverbs::sync. 0→ unbounded (Semaphore::MAX_PERMITS).1→ serial fast-path (preserves pre-M6 wall-order).2..=1024→ bounded parallel.
Env fallback: GREX_PARALLEL is honoured only when the flag is
absent. Clap reads the env var automatically via env.
Distinct from the global --parallel on GlobalFlags; that
knob is documented as the harness-level worker cap and rejects
0. Sync parallelism uses 0 as the “unbounded” sentinel per
.omne/cfg/concurrency.md.
retain_days: Option<u32>v1.2.5 — sweep <meta>/.grex/trash/ of entries older than
N days at the start of every meta sync (best-effort). When
omitted, no GC fires (v1.2.1 indefinite-retention behavior is
preserved). When set, sweep failures log via tracing and do
NOT halt the sync.
Trait Implementations§
Source§impl Args for SyncArgs
impl Args for SyncArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for SyncArgs
impl FromArgMatches for SyncArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for SyncArgs
impl RefUnwindSafe for SyncArgs
impl Send for SyncArgs
impl Sync for SyncArgs
impl Unpin for SyncArgs
impl UnsafeUnpin for SyncArgs
impl UnwindSafe for SyncArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more