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

Function insert_cross_view_outcome

atomic-cli/src/commands/rpc.rs:3968–3986  ·  view source on GitHub ↗

The response's cross-view outcome — the shape the local body's `print_cross_view_outcome` renders (the skipped placeholder hashes exist only for the count the line prints).

(
    response: &pb::InsertChangesResponse,
)

Source from the content-addressed store, hash-verified

3966/// `print_cross_view_outcome` renders (the skipped placeholder hashes
3967/// exist only for the count the line prints).
3968fn insert_cross_view_outcome(
3969 response: &pb::InsertChangesResponse,
3970) -> atomic_repository::CrossViewInsertOutcome {
3971 atomic_repository::CrossViewInsertOutcome {
3972 changes_applied: response.inserted.len(),
3973 applied_hashes: insert_applied_hashes(response),
3974 skipped_hashes: vec![Merkle::ZERO; response.skipped_count as usize],
3975 affected_paths: std::collections::HashSet::new(),
3976 new_state: response
3977 .new_state
3978 .as_ref()
3979 .and_then(|h| h.value.clone().try_into().ok())
3980 .map(Merkle)
3981 .unwrap_or_default(),
3982 sequence: 0,
3983 has_conflicts: response.has_conflicts,
3984 was_dry_run: false,
3985 }
3986}
3987
3988/// The inline conflicted-file entries off the response's listing (the
3989/// first record's line per file, in listing order).

Callers 4

insert_from_viewFunction · 0.85
insert_up_to_tagFunction · 0.85
insert_changesFunction · 0.85
insert_promoteFunction · 0.85

Calls 5

insert_applied_hashesFunction · 0.85
as_refMethod · 0.80
lenMethod · 0.45
okMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected