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

Function Odb_contains

src/odb.c:406–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404
405
406int
407Odb_contains(Odb *self, PyObject *py_name)
408{
409 git_oid oid;
410 size_t len;
411
412 len = py_oid_to_git_oid(py_name, &oid);
413 if (len == 0) {
414 PyErr_SetString(PyExc_TypeError, "name must be an oid");
415 return -1;
416 }
417
418 return git_odb_exists(self->odb, &oid);
419}
420
421PySequenceMethods Odb_as_sequence = {
422 0, /* sq_length */

Callers

nothing calls this directly

Calls 1

py_oid_to_git_oidFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…