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

Function latest_change_hash

atomic-cli/tests/it/git_binding_cb6a_test.rs:330–339  ·  view source on GitHub ↗

The most recent change hash on the current view.

(repo: &atomic_repository::Repository)

Source from the content-addressed store, hash-verified

328
329/// The most recent change hash on the current view.
330fn latest_change_hash(repo: &atomic_repository::Repository) -> atomic_core::Hash {
331 let history = repo
332 .log(atomic_repository::HistoryOptions::default())
333 .expect("view history");
334 history
335 .into_iter()
336 .next()
337 .map(|entry| entry.hash)
338 .expect("at least one recorded change")
339}

Calls 3

logMethod · 0.45
nextMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected