MCPcopy Index your code
hub / github.com/emwalker/digraph / topic_oid

Method topic_oid

backend/src/git/core/mod.rs:131–142  ·  view source on GitHub ↗
(
        &self,
        _timespec: &Timespec,
        topic_id: &ExternalId,
    )

Source from the content-addressed store, hash-verified

129 }
130
131 pub fn topic_oid(
132 &self,
133 _timespec: &Timespec,
134 topic_id: &ExternalId,
135 ) -> Result<Option<git2::Oid>> {
136 let filename = topic_id.object_filename()?;
137 let mut path = deque_from_path(&filename);
138 let reference = self.inner.find_reference("HEAD")?;
139 let tree = reference.peel_to_tree()?;
140 let oid = self.path_to_oid(tree, &mut path);
141 Ok(oid)
142 }
143}
144
145impl<'repo> TryInto<RepoLink> for git2::Blob<'repo> {

Callers 1

topic_pathMethod · 0.80

Calls 3

deque_from_pathFunction · 0.85
object_filenameMethod · 0.80
path_to_oidMethod · 0.80

Tested by

no test coverage detected