| 757 | "commit."); |
| 758 | |
| 759 | PyObject * |
| 760 | Repository_cherrypick(Repository *self, PyObject *py_oid) |
| 761 | { |
| 762 | git_commit *commit; |
| 763 | git_oid oid; |
| 764 | int err; |
| 765 | size_t len; |
| 766 | git_cherrypick_options cherrypick_opts = GIT_CHERRYPICK_OPTIONS_INIT; |
| 767 | |
| 768 | len = py_oid_to_git_oid(py_oid, &oid); |
| 769 | if (len == 0) |
| 770 | return NULL; |
| 771 | |
| 772 | err = git_commit_lookup(&commit, self->repo, &oid); |
| 773 | if (err < 0) |
| 774 | return Error_set(err); |
| 775 | |
| 776 | cherrypick_opts.checkout_opts.checkout_strategy = GIT_CHECKOUT_SAFE; |
| 777 | err = git_cherrypick(self->repo, |
| 778 | commit, |
| 779 | (const git_cherrypick_options *)&cherrypick_opts); |
| 780 | |
| 781 | git_commit_free(commit); |
| 782 | if (err < 0) |
| 783 | return Error_set(err); |
| 784 | |
| 785 | Py_RETURN_NONE; |
| 786 | } |
| 787 | |
| 788 | PyDoc_STRVAR(Repository_walk__doc__, |
| 789 | "walk(oid: Oid | None, sort_mode: enums.SortMode = enums.SortMode.NONE) -> Walker\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…