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

Method fetch_activity

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

Source from the content-addressed store, hash-verified

194 }
195
196 pub fn fetch_activity(
197 &self,
198 repo_id: RepoId,
199 id: &ExternalId,
200 first: usize,
201 ) -> Result<Vec<activity::Change>> {
202 log::info!("fetching first {} change logs from Git for {}", first, id);
203 let index = self.fetch_activity_log(repo_id, id, IndexMode::ReadOnly)?;
204 let mut changes = vec![];
205
206 for reference in index.references().iter().take(first) {
207 let result = self.view(repo_id)?.change(&reference.id);
208 match result {
209 Ok(change) => changes.push(change),
210 Err(err) => log::warn!("failed to load change: {}", err),
211 }
212 }
213
214 Ok(changes)
215 }
216
217 pub fn fetch_activity_log(
218 &self,

Callers 4

callMethod · 0.45
mark_deletedMethod · 0.45
activity_log_updatedFunction · 0.45
change_entries_updatedFunction · 0.45

Calls 5

fetch_activity_logMethod · 0.80
referencesMethod · 0.80
iterMethod · 0.45
changeMethod · 0.45
viewMethod · 0.45

Tested by 2

activity_log_updatedFunction · 0.36
change_entries_updatedFunction · 0.36