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

Function Diff_getitem

src/diff.c:1073–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1071}
1072
1073PyObject *
1074Diff_getitem(Diff *self, PyObject *value)
1075{
1076 size_t i;
1077
1078 if (!PyLong_Check(value))
1079 return NULL; /* FIXME Raise error */
1080
1081 i = PyLong_AsSize_t(value);
1082 return diff_get_patch_byindex(self->diff, i);
1083}
1084
1085PyDoc_STRVAR(Diff_stats__doc__, "Accumulate diff statistics for all patches.");
1086

Callers

nothing calls this directly

Calls 1

diff_get_patch_byindexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…