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

Function observed_tip

atomic-cli/src/commands/git/ref_mapping.rs:58–65  ·  view source on GitHub ↗
(git: &GitRepository, local_ref: Option<&str>)

Source from the content-addressed store, hash-verified

56}
57
58fn observed_tip(git: &GitRepository, local_ref: Option<&str>) -> Option<String> {
59 local_ref.and_then(|reference| {
60 git.find_reference(reference)
61 .ok()
62 .and_then(|reference| reference.target())
63 .map(|oid| oid.to_string())
64 })
65}
66
67/// The live tip of `view`'s mapped local ref (hex), or `None`.
68///

Callers 3

mapped_ref_tipFunction · 0.85
ensure_baseline_mappingFunction · 0.85

Calls 1

okMethod · 0.45

Tested by

no test coverage detected