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

Function Patch_text__get__

src/patch.c:198–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196 "To access the raw, un-decoded patch, use `patch.data`.");
197
198PyObject *
199Patch_text__get__(Patch *self)
200{
201 git_buf buf = {NULL};
202 int err;
203 PyObject *text;
204
205 assert(self->patch);
206 err = git_patch_to_buf(&buf, self->patch);
207 if (err < 0)
208 return Error_set(err);
209
210 text = to_unicode_n(buf.ptr, buf.size, NULL, NULL);
211 git_buf_dispose(&buf);
212 return text;
213}
214
215PyDoc_STRVAR(Patch_hunks__doc__, "hunks");
216

Callers

nothing calls this directly

Calls 2

Error_setFunction · 0.85
to_unicode_nFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…