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

Function Odb_exists

src/odb.c:297–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 "Returns true if the given oid can be found in this odb.");
296
297PyObject *
298Odb_exists(Odb *self, PyObject *py_hex)
299{
300 git_oid oid;
301 size_t len;
302 int result;
303
304 len = py_oid_to_git_oid(py_hex, &oid);
305 if (len == 0)
306 return NULL;
307
308 result = git_odb_exists(self->odb, &oid);
309 if (result < 0)
310 return Error_set(result);
311 else if (result == 0)
312 Py_RETURN_FALSE;
313 else
314 Py_RETURN_TRUE;
315}
316
317
318PyDoc_STRVAR(Odb_add_backend__doc__,

Callers

nothing calls this directly

Calls 2

py_oid_to_git_oidFunction · 0.85
Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…