MCPcopy Create free account
hub / github.com/libgit2/pygit2 / wrap_diff_stats

Function wrap_diff_stats

src/diff.c:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140PyObject *
141wrap_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
162PyObject *
163wrap_diff_line(const git_diff_line *line, DiffHunk *hunk)

Callers 1

Diff_stats__get__Function · 0.85

Calls 1

Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…