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

Function OdbBackend_exists_prefix

src/odb_backend.c:478–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476 "or ValueError if ambiguous.");
477
478PyObject *
479OdbBackend_exists_prefix(OdbBackend *self, PyObject *py_hex)
480{
481 int result;
482 size_t len;
483 git_oid oid;
484
485 if (self->odb_backend->exists_prefix == NULL)
486 Py_RETURN_NOTIMPLEMENTED;
487
488 len = py_oid_to_git_oid(py_hex, &oid);
489 if (len == 0)
490 return NULL;
491
492 git_oid out;
493 result = self->odb_backend->exists_prefix(&out, self->odb_backend, &oid, len);
494
495 if (result < 0)
496 return Error_set(result);
497
498 return git_oid_to_python(&out);
499}
500
501PyDoc_STRVAR(OdbBackend_refresh__doc__,
502 "refresh()\n"

Callers

nothing calls this directly

Calls 3

py_oid_to_git_oidFunction · 0.85
Error_setFunction · 0.85
git_oid_to_pythonFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…