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

Function latest_change

atomic-cli/tests/it/git_guard_cb0c_test.rs:315–323  ·  view source on GitHub ↗
(fixture: &Fixture)

Source from the content-addressed store, hash-verified

313}
314
315fn latest_change(fixture: &Fixture) -> String {
316 let log: Value = serde_json::from_slice(&fixture.log_json()).expect("Atomic JSON log");
317 log.as_array()
318 .and_then(|changes| changes.first())
319 .and_then(|change| change.get("hash"))
320 .and_then(Value::as_str)
321 .expect("latest Atomic change hash")
322 .to_string()
323}
324
325fn assert_guard_refusal(fixture: &Fixture, operation: &str, args: &[&str]) {
326 let before = RepositorySnapshot::capture(fixture);

Calls 2

log_jsonMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected