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

Function journal_records

atomic-cli/tests/it/git_shim_cb0d_test.rs:116–126  ·  view source on GitHub ↗
(root: &Path)

Source from the content-addressed store, hash-verified

114}
115
116fn journal_records(root: &Path) -> Vec<Value> {
117 let content = match fs::read_to_string(journal_path(root)) {
118 Ok(content) => content,
119 Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Vec::new(),
120 Err(error) => panic!("read journal: {error}"),
121 };
122 content
123 .lines()
124 .map(|line| serde_json::from_str(line).expect("JSONL record"))
125 .collect()
126}
127
128fn wait_for_deferred_receipt(root: &Path, minimum_checkout_events: usize) -> Vec<Value> {
129 let deadline = Instant::now() + Duration::from_secs(10);

Callers 1

Calls 4

journal_pathFunction · 0.85
kindMethod · 0.45
collectMethod · 0.45
linesMethod · 0.45

Tested by

no test coverage detected