MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / get_commits

Method get_commits

src/structures/wal.rs:249–259  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

247 // }
248
249 pub fn get_commits(&mut self) -> Result<Vec<CommitListItem>, io::Error> {
250 let start = 0;
251 let end = u64::MAX;
252
253 let commits = self
254 .commit_list
255 .get_range(start, end)
256 .expect("Error getting commits");
257
258 Ok(commits.into_iter().map(|(_, v)| v).collect())
259 }
260
261 pub fn get_commit(&mut self, hash: u64) -> Result<Option<CommitListItem>, io::Error> {
262 match self.commit_list.search(hash) {

Callers

nothing calls this directly

Calls 1

get_rangeMethod · 0.80

Tested by

no test coverage detected