| 173 | PyDoc_STRVAR(Patch_data__doc__, "The raw bytes of the patch's contents."); |
| 174 | |
| 175 | PyObject * |
| 176 | Patch_data__get__(Patch *self) |
| 177 | { |
| 178 | git_buf buf = {NULL}; |
| 179 | int err; |
| 180 | PyObject *bytes; |
| 181 | |
| 182 | assert(self->patch); |
| 183 | err = git_patch_to_buf(&buf, self->patch); |
| 184 | if (err < 0) |
| 185 | return Error_set(err); |
| 186 | |
| 187 | bytes = PyBytes_FromStringAndSize(buf.ptr, buf.size); |
| 188 | git_buf_dispose(&buf); |
| 189 | return bytes; |
| 190 | } |
| 191 | |
| 192 | PyDoc_STRVAR(Patch_text__doc__, |
| 193 | "Patch diff string. Can be None in some cases, such as empty commits.\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…