| 1096 | "Parses a git unified diff into a diff object without a repository"); |
| 1097 | |
| 1098 | static PyObject * |
| 1099 | Diff_parse_diff(PyObject *self, PyObject *py_str) |
| 1100 | { |
| 1101 | /* A wrapper around git_diff_from_buffer */ |
| 1102 | git_diff *diff; |
| 1103 | |
| 1104 | const char *content = pgit_borrow(py_str); |
| 1105 | if (content == NULL) |
| 1106 | return NULL; |
| 1107 | |
| 1108 | int err = git_diff_from_buffer(&diff, content, strlen(content)); |
| 1109 | if (err < 0) |
| 1110 | return Error_set(err); |
| 1111 | |
| 1112 | return wrap_diff(diff, NULL); |
| 1113 | } |
| 1114 | |
| 1115 | static void |
| 1116 | Diff_dealloc(Diff *self) |
nothing calls this directly
no test coverage detected
searching dependent graphs…