| 484 | "If no type is provided, the first non-tag object will be returned."); |
| 485 | |
| 486 | PyObject * |
| 487 | Reference_peel(Reference *self, PyObject *args) |
| 488 | { |
| 489 | int err; |
| 490 | git_otype otype; |
| 491 | git_object *obj; |
| 492 | PyObject *py_type = Py_None; |
| 493 | |
| 494 | CHECK_REFERENCE(self); |
| 495 | |
| 496 | if (!PyArg_ParseTuple(args, "|O", &py_type)) |
| 497 | return NULL; |
| 498 | |
| 499 | otype = py_object_to_otype(py_type); |
| 500 | if (otype == GIT_OBJECT_INVALID) |
| 501 | return NULL; |
| 502 | |
| 503 | err = git_reference_peel(&obj, self->reference, otype); |
| 504 | if (err < 0) |
| 505 | return Error_set(err); |
| 506 | |
| 507 | return wrap_object(obj, self->repo, NULL); |
| 508 | } |
| 509 | |
| 510 | PyObject * |
| 511 | Reference_richcompare(PyObject *o1, PyObject *o2, int op) |
nothing calls this directly
no test coverage detected
searching dependent graphs…