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

Method count_changes

atomic-repository/src/changestore/mod.rs:548–555  ·  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

546 /// println!("Repository has {} changes", count);
547 /// ```
548 pub fn count_changes(&self) -> ChangeStoreResult<usize> {
549 let mut count = 0;
550 for result in self.iter_changes() {
551 result?;
552 count += 1;
553 }
554 Ok(count)
555 }
556
557 /// Clear the in-memory cache.
558 ///

Callers

nothing calls this directly

Calls 1

iter_changesMethod · 0.45

Tested by

no test coverage detected