| 520 | "Note that a commit is not considered a descendant of itself."); |
| 521 | |
| 522 | PyObject * |
| 523 | Repository_descendant_of(Repository *self, PyObject *args) |
| 524 | { |
| 525 | PyObject *value1; |
| 526 | PyObject *value2; |
| 527 | git_oid oid1; |
| 528 | git_oid oid2; |
| 529 | int err; |
| 530 | |
| 531 | if (!PyArg_ParseTuple(args, "OO", &value1, &value2)) |
| 532 | return NULL; |
| 533 | |
| 534 | err = py_oid_to_git_oid_expand(self->repo, value1, &oid1); |
| 535 | if (err < 0) |
| 536 | return NULL; |
| 537 | |
| 538 | err = py_oid_to_git_oid_expand(self->repo, value2, &oid2); |
| 539 | if (err < 0) |
| 540 | return NULL; |
| 541 | |
| 542 | // err < 0 => error, see source code of `git_graph_descendant_of` |
| 543 | err = git_graph_descendant_of(self->repo, &oid1, &oid2); |
| 544 | if (err < 0) |
| 545 | return Error_set(err); |
| 546 | |
| 547 | return PyBool_FromLong(err); |
| 548 | } |
| 549 | |
| 550 | PyDoc_STRVAR(Repository_merge_base__doc__, |
| 551 | "merge_base(oid1: Oid, oid2: Oid) -> Oid\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…