(&self)
| 38 | |
| 39 | impl 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 | } |
nothing calls this directly
no test coverage detected