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

Function require_revision

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

Source from the content-addressed store, hash-verified

91}
92
93pub(crate) fn require_revision(path: &str, expected: Option<&str>, actual: &str) -> CliResult<()> {
94 match expected {
95 Some(expected) if !expected.eq_ignore_ascii_case(actual) => {
96 return Err(CliError::InvalidArgument {
97 message: format!(
98 "Vault entry revision changed for {path}: expected {expected}, found {actual}"
99 ),
100 });
101 }
102 _ => {}
103 }
104 Ok(())
105}
106
107pub(crate) fn entry_json(path: &str, entry: &VaultEntry, revision_hash: &str) -> serde_json::Value {
108 serde_json::json!({

Callers 3

vault_showFunction · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by 1