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

Function RefdbFsBackend_init

src/refdb_backend.c:854–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

852 "is used as the basis of the reference database.");
853
854int
855RefdbFsBackend_init(RefdbFsBackend *self, PyObject *args, PyObject *kwds)
856{
857 if (kwds && PyDict_Size(kwds) > 0) {
858 PyErr_SetString(PyExc_TypeError, "RefdbFsBackend takes no keyword arguments");
859 return -1;
860 }
861
862 Repository *repo = NULL;
863 if (!PyArg_ParseTuple(args, "O!", &RepositoryType, &repo))
864 return -1;
865
866 int err = git_refdb_backend_fs(&self->super.refdb_backend, repo->repo);
867 if (err) {
868 Error_set(err);
869 return -1;
870 }
871
872 return 0;
873}
874
875PyTypeObject RefdbFsBackendType = {
876 PyVarObject_HEAD_INIT(NULL, 0)

Callers

nothing calls this directly

Calls 1

Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…