| 191 | } |
| 192 | |
| 193 | static int |
| 194 | pgit_odb_backend_exists_prefix(git_oid *out, git_odb_backend *_be, |
| 195 | const git_oid *short_id, size_t len) |
| 196 | { |
| 197 | // short_id to hex |
| 198 | char short_id_hex[GIT_OID_HEXSZ]; |
| 199 | git_oid_nfmt(short_id_hex, len, short_id); |
| 200 | |
| 201 | // Call callback |
| 202 | pgit_odb_backend *be = (pgit_odb_backend *)_be; |
| 203 | PyObject *py_oid = PyObject_CallMethod(be->py_backend, "exists_prefix_cb", "s#", short_id_hex, len); |
| 204 | if (py_oid == NULL) |
| 205 | return git_error_for_exc(); |
| 206 | |
| 207 | py_oid_to_git_oid(py_oid, out); |
| 208 | Py_DECREF(py_oid); |
| 209 | return 0; |
| 210 | } |
| 211 | |
| 212 | static int |
| 213 | pgit_odb_backend_refresh(git_odb_backend *_be) |
nothing calls this directly
no test coverage detected
searching dependent graphs…