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

Function change_graph_summary

libatomic/src/daemon/services_query.rs:291–307  ·  view source on GitHub ↗
(change: &atomic_core::change::Change)

Source from the content-addressed store, hash-verified

289}
290
291fn change_graph_summary(change: &atomic_core::change::Change) -> ChangeGraphSummary {
292 let (vertices, edges) = atomic_repository::triage::count_hunk_atoms(change.hunks());
293 ChangeGraphSummary {
294 vertices_added: vertices as u64,
295 edges_changed: edges as u64,
296 content_bytes: change.contents.len() as u64,
297 files_changed: atomic_repository::get_files_in_change(change).len() as u64,
298 files: atomic_repository::triage::hunk_display_summaries(change.hunks())
299 .into_iter()
300 .map(|summary| ChangeFileSummary {
301 symbol: summary.symbol.to_string(),
302 path: summary.path,
303 info: summary.info,
304 })
305 .collect(),
306 }
307}
308
309pub async fn get_change_impl(
310 state: &Arc<DaemonState>,

Callers 1

Calls 7

count_hunk_atomsFunction · 0.85
get_files_in_changeFunction · 0.85
hunk_display_summariesFunction · 0.85
hunksMethod · 0.45
lenMethod · 0.45
collectMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected