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

Method view_contains_changes

atomic-repository/src/repository/ref_mapping.rs:324–337  ·  view source on GitHub ↗

Whether the view's effective change filter contains every hash in `changes` (CB-10A: closure containment, never SetId/name similarity).

(
        &self,
        view: &str,
        changes: &[Hash],
    )

Source from the content-addressed store, hash-verified

322 /// Whether the view's effective change filter contains every hash in
323 /// `changes` (CB-10A: closure containment, never SetId/name similarity).
324 pub fn view_contains_changes(
325 &self,
326 view: &str,
327 changes: &[Hash],
328 ) -> Result<bool, RepositoryError> {
329 let txn = self.pristine.read_txn().map_err(pristine_error)?;
330 let view_state = txn.get_view(view).map_err(pristine_error)?.ok_or_else(|| {
331 RepositoryError::ViewNotFound {
332 name: view.to_string(),
333 }
334 })?;
335 let visibility = super::operation::visible_change_hashes(&txn, &view_state)?;
336 Ok(changes.iter().all(|change| visibility.contains(change)))
337 }
338
339 /// The complete closure a Git commit is bound to (verified interpretation,
340 /// CB-9B R1), or `None` when the commit has no persisted closure.

Callers 1

Calls 6

visible_change_hashesFunction · 0.85
read_txnMethod · 0.80
get_viewMethod · 0.45
allMethod · 0.45
iterMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected