| 301 | "Returns the Git object with the given oid."); |
| 302 | |
| 303 | PyObject * |
| 304 | Repository_git_object_lookup_prefix(Repository *self, PyObject *key) |
| 305 | { |
| 306 | int err; |
| 307 | size_t len; |
| 308 | git_oid oid; |
| 309 | git_object *obj; |
| 310 | |
| 311 | len = py_oid_to_git_oid(key, &oid); |
| 312 | if (len == 0) |
| 313 | return NULL; |
| 314 | |
| 315 | err = git_object_lookup_prefix(&obj, self->repo, &oid, len, GIT_OBJECT_ANY); |
| 316 | if (err == 0) |
| 317 | return wrap_object(obj, self, NULL); |
| 318 | |
| 319 | if (err == GIT_ENOTFOUND) |
| 320 | Py_RETURN_NONE; |
| 321 | |
| 322 | return Error_set_oid(err, &oid, len); |
| 323 | } |
| 324 | |
| 325 | |
| 326 | PyDoc_STRVAR(Repository_lookup_branch__doc__, |
nothing calls this directly
no test coverage detected
searching dependent graphs…