| 295 | "Returns true if the given oid can be found in this odb."); |
| 296 | |
| 297 | PyObject * |
| 298 | Odb_exists(Odb *self, PyObject *py_hex) |
| 299 | { |
| 300 | git_oid oid; |
| 301 | size_t len; |
| 302 | int result; |
| 303 | |
| 304 | len = py_oid_to_git_oid(py_hex, &oid); |
| 305 | if (len == 0) |
| 306 | return NULL; |
| 307 | |
| 308 | result = git_odb_exists(self->odb, &oid); |
| 309 | if (result < 0) |
| 310 | return Error_set(result); |
| 311 | else if (result == 0) |
| 312 | Py_RETURN_FALSE; |
| 313 | else |
| 314 | Py_RETURN_TRUE; |
| 315 | } |
| 316 | |
| 317 | |
| 318 | PyDoc_STRVAR(Odb_add_backend__doc__, |
nothing calls this directly
no test coverage detected
searching dependent graphs…