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

Function require_revision

atomic-cli/src/commands/vault/show.rs:83–95  ·  view source on GitHub ↗
(path: &str, expected: Option<&str>, actual: &str)

Source from the content-addressed store, hash-verified

81}
82
83fn require_revision(path: &str, expected: Option<&str>, actual: &str) -> CliResult<()> {
84 match expected {
85 Some(expected) if !expected.eq_ignore_ascii_case(actual) => {
86 return Err(CliError::InvalidArgument {
87 message: format!(
88 "Vault entry revision changed for {path}: expected {expected}, found {actual}"
89 ),
90 });
91 }
92 _ => {}
93 }
94 Ok(())
95}
96
97fn entry_json(path: &str, entry: &VaultEntry, revision_hash: &str) -> serde_json::Value {
98 serde_json::json!({

Callers 2

runMethod · 0.85

Calls

no outgoing calls

Tested by 1