| 412 | "of the result tuple."); |
| 413 | |
| 414 | PyObject * |
| 415 | Repository_revparse_ext(Repository *self, PyObject *py_spec) |
| 416 | { |
| 417 | /* Get the C revision spec */ |
| 418 | const char *c_spec = pgit_borrow(py_spec); |
| 419 | if (c_spec == NULL) |
| 420 | return NULL; |
| 421 | |
| 422 | /* Lookup */ |
| 423 | git_object *c_obj = NULL; |
| 424 | git_reference *c_ref = NULL; |
| 425 | int err = git_revparse_ext(&c_obj, &c_ref, self->repo, c_spec); |
| 426 | if (err) |
| 427 | return Error_set_str(err, c_spec); |
| 428 | |
| 429 | PyObject *py_obj = wrap_object(c_obj, self, NULL); |
| 430 | PyObject *py_ref = NULL; |
| 431 | if (c_ref != NULL) { |
| 432 | py_ref = wrap_reference(c_ref, self); |
| 433 | } else { |
| 434 | py_ref = Py_None; |
| 435 | Py_INCREF(Py_None); |
| 436 | } |
| 437 | return Py_BuildValue("NN", py_obj, py_ref); |
| 438 | } |
| 439 | |
| 440 | |
| 441 | PyDoc_STRVAR(Repository_revparse__doc__, |
nothing calls this directly
no test coverage detected
searching dependent graphs…