MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run

Method run

atomic-cli/src/commands/vault/sync.rs:40–58  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

38
39impl Command for Sync {
40 fn run(&self) -> CliResult<()> {
41 let root = find_repository_root()?;
42 let repo = Repository::open(&root).map_err(CliError::Repository)?;
43
44 let updated = repo
45 .vault_record_working_copy()
46 .map_err(CliError::Repository)?;
47
48 if updated.is_empty() {
49 println!("Vault is up to date.");
50 } else {
51 for path in &updated {
52 println!(" synced: {}", path);
53 }
54 println!("\nSynced {} vault files.", updated.len());
55 }
56
57 Ok(())
58 }
59}

Callers

nothing calls this directly

Calls 3

find_repository_rootFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected