| 554 | "Returns None if there is no merge base between the commits"); |
| 555 | |
| 556 | PyObject * |
| 557 | Repository_merge_base(Repository *self, PyObject *args) |
| 558 | { |
| 559 | PyObject *value1; |
| 560 | PyObject *value2; |
| 561 | git_oid oid; |
| 562 | git_oid oid1; |
| 563 | git_oid oid2; |
| 564 | int err; |
| 565 | |
| 566 | if (!PyArg_ParseTuple(args, "OO", &value1, &value2)) |
| 567 | return NULL; |
| 568 | |
| 569 | err = py_oid_to_git_oid_expand(self->repo, value1, &oid1); |
| 570 | if (err < 0) |
| 571 | return NULL; |
| 572 | |
| 573 | err = py_oid_to_git_oid_expand(self->repo, value2, &oid2); |
| 574 | if (err < 0) |
| 575 | return NULL; |
| 576 | |
| 577 | err = git_merge_base(&oid, self->repo, &oid1, &oid2); |
| 578 | |
| 579 | if (err == GIT_ENOTFOUND) |
| 580 | Py_RETURN_NONE; |
| 581 | |
| 582 | if (err < 0) |
| 583 | return Error_set(err); |
| 584 | |
| 585 | return git_oid_to_python(&oid); |
| 586 | } |
| 587 | |
| 588 | typedef int (*git_merge_base_xxx_t)(git_oid *out, git_repository *repo, size_t length, const git_oid input_array[]); |
| 589 |
nothing calls this directly
no test coverage detected
searching dependent graphs…