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

Function Object_peel

src/object.c:215–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 "object type will raise InvalidSpecError.\n");
214
215PyObject *
216Object_peel(Object *self, PyObject *py_type)
217{
218 int err;
219 git_otype otype;
220 git_object *peeled;
221
222 if (Object__load(self) == NULL) { return NULL; } // Lazy load
223
224 otype = py_object_to_otype(py_type);
225 if (otype == GIT_OBJECT_INVALID)
226 return NULL;
227
228 err = git_object_peel(&peeled, self->obj, otype);
229 if (err < 0)
230 return Error_set(err);
231
232 return wrap_object(peeled, self->repo, NULL);
233}
234
235Py_hash_t
236Object_hash(Object *self)

Callers

nothing calls this directly

Calls 4

Object__loadFunction · 0.85
py_object_to_otypeFunction · 0.85
Error_setFunction · 0.85
wrap_objectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…