MCPcopy Create free account
hub / github.com/emwalker/digraph / fetch

Method fetch

backend/src/git/client.rs:175–194  ·  view source on GitHub ↗
(&self, repo_id: RepoId, id: &ExternalId)

Source from the content-addressed store, hash-verified

173 }
174
175 pub fn fetch(&self, repo_id: RepoId, id: &ExternalId) -> Option<RepoObject> {
176 if !self.viewer.can_read(repo_id) {
177 log::warn!("viewer cannot read path: {}", id);
178 return None;
179 }
180
181 match self.view(repo_id) {
182 Ok(repo) => match repo.object(id) {
183 Ok(object) => object,
184 Err(err) => {
185 println!("failed to fetch object: {err:?}");
186 None
187 }
188 },
189 Err(err) => {
190 println!("failed to open repo: {err:?}");
191 None
192 }
193 }
194 }
195
196 pub fn fetch_activity(
197 &self,

Callers 3

fetch_linkMethod · 0.45
fetch_allMethod · 0.45
fetch_topicMethod · 0.45

Calls 3

can_readMethod · 0.80
objectMethod · 0.80
viewMethod · 0.45

Tested by

no test coverage detected