MCPcopy Create free account
hub / github.com/libgit2/pygit2 / pgit_odb_backend_foreach

Function pgit_odb_backend_foreach

src/odb_backend.c:220–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220static int
221pgit_odb_backend_foreach(git_odb_backend *_be,
222 git_odb_foreach_cb cb, void *payload)
223{
224 PyObject *item;
225 git_oid oid;
226 pgit_odb_backend *be = (pgit_odb_backend *)_be;
227 PyObject *iterator = PyObject_GetIter((PyObject *)be->py_backend);
228 assert(iterator);
229
230 while ((item = PyIter_Next(iterator))) {
231 py_oid_to_git_oid(item, &oid);
232 cb(&oid, payload);
233 Py_DECREF(item);
234 }
235
236 return git_error_for_exc();
237}
238
239static void
240pgit_odb_backend_free(git_odb_backend *backend)

Callers

nothing calls this directly

Calls 2

py_oid_to_git_oidFunction · 0.85
git_error_for_excFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…