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

Function pgit_odb_backend_exists

src/odb_backend.c:175–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175static int
176pgit_odb_backend_exists(git_odb_backend *_be, const git_oid *oid)
177{
178 pgit_odb_backend *be = (pgit_odb_backend *)_be;
179
180 PyObject *py_oid = git_oid_to_python(oid);
181 if (py_oid == NULL)
182 return GIT_EUSER;
183
184 PyObject *result = PyObject_CallMethod(be->py_backend, "exists_cb", "N", py_oid);
185 if (result == NULL)
186 return git_error_for_exc();
187
188 int r = PyObject_IsTrue(result);
189 Py_DECREF(result);
190 return r;
191}
192
193static int
194pgit_odb_backend_exists_prefix(git_oid *out, git_odb_backend *_be,

Callers

nothing calls this directly

Calls 2

git_oid_to_pythonFunction · 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…