| 524 | }; |
| 525 | |
| 526 | PyObject * |
| 527 | diff_get_patch_byindex(git_diff *diff, size_t idx) |
| 528 | { |
| 529 | git_patch *patch = NULL; |
| 530 | int err; |
| 531 | |
| 532 | err = git_patch_from_diff(&patch, diff, idx); |
| 533 | if (err < 0) |
| 534 | return Error_set(err); |
| 535 | |
| 536 | /* libgit2 may decide not to create a patch if the file is |
| 537 | "unchanged or binary", but this isn't an error case */ |
| 538 | if (patch == NULL) |
| 539 | Py_RETURN_NONE; |
| 540 | |
| 541 | return (PyObject*) wrap_patch(patch, NULL, NULL); |
| 542 | } |
| 543 | |
| 544 | PyObject * |
| 545 | DiffIter_iternext(DiffIter *self) |
no test coverage detected
searching dependent graphs…