| 173 | } |
| 174 | |
| 175 | static int |
| 176 | pgit_odb_backend_exists(git_odb_backend *_be, const git_oid *oid) |
| 177 | { |
| 178 | pgit_odb_backend *be = (pgit_odb_backend *)_be; |
| 179 | |
| 180 | PyObject *py_oid = git_oid_to_python(oid); |
| 181 | if (py_oid == NULL) |
| 182 | return GIT_EUSER; |
| 183 | |
| 184 | PyObject *result = PyObject_CallMethod(be->py_backend, "exists_cb", "N", py_oid); |
| 185 | if (result == NULL) |
| 186 | return git_error_for_exc(); |
| 187 | |
| 188 | int r = PyObject_IsTrue(result); |
| 189 | Py_DECREF(result); |
| 190 | return r; |
| 191 | } |
| 192 | |
| 193 | static int |
| 194 | pgit_odb_backend_exists_prefix(git_oid *out, git_odb_backend *_be, |
nothing calls this directly
no test coverage detected
searching dependent graphs…