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

Function require_revision

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

Source from the content-addressed store, hash-verified

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

Callers 2

runMethod · 0.85

Calls

no outgoing calls

Tested by 1