| 697 | "Patch diff string. Can be None in some cases, such as empty commits."); |
| 698 | |
| 699 | PyObject * |
| 700 | Diff_patch__get__(Diff *self) |
| 701 | { |
| 702 | git_buf buf = {NULL}; |
| 703 | |
| 704 | int err = git_diff_to_buf(&buf, self->diff, GIT_DIFF_FORMAT_PATCH); |
| 705 | if (err < 0) |
| 706 | return Error_set(err); |
| 707 | |
| 708 | PyObject *py_patch = to_unicode_n(buf.ptr, buf.size, NULL, NULL); |
| 709 | |
| 710 | git_buf_dispose(&buf); |
| 711 | return py_patch; |
| 712 | } |
| 713 | |
| 714 | |
| 715 | static void |
nothing calls this directly
no test coverage detected
searching dependent graphs…