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

Function checkpoint_field

atomic-cli/tests/it/git_anchor_cb7a_test.rs:163–167  ·  view source on GitHub ↗
(root: &Path, field: &str)

Source from the content-addressed store, hash-verified

161}
162
163fn checkpoint_field(root: &Path, field: &str) -> String {
164 let bytes = fs::read(root.join(".atomic/bridge/workspace.json")).expect("checkpoint exists");
165 let value: serde_json::Value = serde_json::from_slice(&bytes).expect("checkpoint json");
166 value[field].as_str().unwrap_or("").to_string()
167}
168
169fn head_map(root: &Path) -> serde_json::Value {
170 let bytes = fs::read(root.join(".atomic/bridge/head-map.json")).expect("head map exists");

Calls 2

readFunction · 0.70
as_strMethod · 0.45

Tested by

no test coverage detected