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

Function binding_loss_notes

atomic-cli/src/commands/git/binding.rs:484–500  ·  view source on GitHub ↗

The binding payload's reviewed loss facts (review CB-9C R7): the view's explicit EmptyDirectory projection losses, mapped to the binding codec's typed note.

(
    repo: &atomic_repository::Repository,
    view_name: &str,
)

Source from the content-addressed store, hash-verified

482/// explicit EmptyDirectory projection losses, mapped to the binding codec's
483/// typed note.
484fn binding_loss_notes(
485 repo: &atomic_repository::Repository,
486 view_name: &str,
487) -> CliResult<Vec<LossNote>> {
488 let notes = repo.empty_directory_loss_notes(view_name)?;
489 Ok(notes
490 .into_iter()
491 .map(|note| match note {
492 atomic_repository::record::LossNote::EmptyDirectory { path } => {
493 LossNote::EmptyDirectory { path }
494 }
495 other => LossNote::Other {
496 description: format!("{other:?}"),
497 },
498 })
499 .collect())
500}
501
502fn sole_working_copy_operation(
503 repo: &atomic_repository::Repository,

Callers 1

publishFunction · 0.85

Calls 3

collectMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected