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

Method count_changes

atomic-repository/src/repository/changes.rs:1254–1258  ·  view source on GitHub ↗

Count the number of changes stored in the repository. This scans the entire changes directory. # Example ```rust,ignore let count = repo.count_changes()?; println!("Repository has {} changes", count); ```

(&self)

Source from the content-addressed store, hash-verified

1252 /// println!("Repository has {} changes", count);
1253 /// ```
1254 pub fn count_changes(&self) -> Result<usize, RepositoryError> {
1255 self.change_store
1256 .count_changes()
1257 .map_err(|e| RepositoryError::Database(e.to_string()))
1258 }
1259
1260 /// Iterate over all change hashes stored in the repository.
1261 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected