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

Method count_changes

atomic-repository/src/changestore/mod.rs:660–667  ·  view source on GitHub ↗

Count the number of changes stored on disk. This scans the entire changes directory and counts valid change files. # Example ```rust,ignore let count = store.count_changes()?; println!("Repository has {} changes", count); ```

(&self)

Source from the content-addressed store, hash-verified

658 /// println!("Repository has {} changes", count);
659 /// ```
660 pub fn count_changes(&self) -> ChangeStoreResult<usize> {
661 let mut count = 0;
662 for result in self.iter_changes() {
663 result?;
664 count += 1;
665 }
666 Ok(count)
667 }
668
669 /// Evict one cached object after an externally journaled deletion.
670 pub fn evict(&self, hash: &Hash) {

Callers

nothing calls this directly

Calls 1

iter_changesMethod · 0.45

Tested by

no test coverage detected