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

Function visible_change_hashes

atomic-repository/src/repository/operation.rs:3911–3924  ·  view source on GitHub ↗

The complete effective change-filter of `view` as hashes (CB-10A closure containment input). Dependency-first closure with external hashes; changes without a registered external hash are skipped by construction because they cannot be compared against Git closure evidence.

(
    txn: &atomic_core::pristine::ReadTxn,
    view: &atomic_core::pristine::ViewState,
)

Source from the content-addressed store, hash-verified

3909/// without a registered external hash are skipped by construction because
3910/// they cannot be compared against Git closure evidence.
3911pub(super) fn visible_change_hashes(
3912 txn: &atomic_core::pristine::ReadTxn,
3913 view: &atomic_core::pristine::ViewState,
3914) -> Result<BTreeSet<Hash>, RepositoryError> {
3915 let visibility = super::filter::graph_visibility_closure(txn, view)
3916 .map_err(|error| RepositoryError::Database(error.to_string()))?;
3917 let mut hashes = BTreeSet::new();
3918 for change_id in visibility.iter_dependency_first().copied() {
3919 if let Some(hash) = txn.get_external(change_id).map_err(pristine_error)? {
3920 hashes.insert(hash);
3921 }
3922 }
3923 Ok(hashes)
3924}
3925
3926fn observe_metadata_value_in_write(
3927 txn: &atomic_core::pristine::WriteTxn<'_>,

Callers 1

view_contains_changesMethod · 0.85

Calls 4

graph_visibility_closureFunction · 0.85
iter_dependency_firstMethod · 0.80
get_externalMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected