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

Method run

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

vault_syncFunction · 0.85
find_repository_rootFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected