| 106 | "the default backends, assuming the repository dir as the folder."); |
| 107 | |
| 108 | PyObject * |
| 109 | Refdb_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 | |
| 128 | static PyMethodDef Refdb_methods[] = { |
| 129 | METHOD(Refdb, compress, METH_NOARGS), |
nothing calls this directly
no test coverage detected
searching dependent graphs…