| 138 | } |
| 139 | |
| 140 | PyObject * |
| 141 | wrap_diff_stats(git_diff *diff) |
| 142 | { |
| 143 | git_diff_stats *stats; |
| 144 | DiffStats *py_stats; |
| 145 | int err; |
| 146 | |
| 147 | err = git_diff_get_stats(&stats, diff); |
| 148 | if (err < 0) |
| 149 | return Error_set(err); |
| 150 | |
| 151 | py_stats = PyObject_New(DiffStats, &DiffStatsType); |
| 152 | if (!py_stats) { |
| 153 | git_diff_stats_free(stats); |
| 154 | return NULL; |
| 155 | } |
| 156 | |
| 157 | py_stats->stats = stats; |
| 158 | |
| 159 | return (PyObject *) py_stats; |
| 160 | } |
| 161 | |
| 162 | PyObject * |
| 163 | wrap_diff_line(const git_diff_line *line, DiffHunk *hunk) |
no test coverage detected
searching dependent graphs…