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

Function Refdb_open

src/refdb.c:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 "the default backends, assuming the repository dir as the folder.");
107
108PyObject *
109Refdb_open(PyObject *self, Repository *repo)
110{
111 if (!PyObject_IsInstance((PyObject *)repo, (PyObject *)&RepositoryType)) {
112 PyErr_SetString(PyExc_TypeError,
113 "Refdb.open expects an object of type "
114 "pygit2.Repository");
115 return NULL;
116 }
117
118 git_refdb *refdb;
119 int err = git_refdb_open(&refdb, repo->repo);
120 if (err) {
121 Error_set(err);
122 return NULL;
123 }
124
125 return wrap_refdb(refdb);
126}
127
128static PyMethodDef Refdb_methods[] = {
129 METHOD(Refdb, compress, METH_NOARGS),

Callers

nothing calls this directly

Calls 2

Error_setFunction · 0.85
wrap_refdbFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…