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

Function Repository_revparse_single

src/repository.c:385–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 "information on the syntax accepted.");
384
385PyObject *
386Repository_revparse_single(Repository *self, PyObject *py_spec)
387{
388 /* Get the C revision spec */
389 const char *c_spec = pgit_borrow(py_spec);
390 if (c_spec == NULL)
391 return NULL;
392
393 /* Lookup */
394 git_object *c_obj;
395 int err = git_revparse_single(&c_obj, self->repo, c_spec);
396 if (err)
397 return Error_set_str(err, c_spec);
398
399 return wrap_object(c_obj, self, NULL);
400}
401
402
403PyDoc_STRVAR(Repository_revparse_ext__doc__,

Callers

nothing calls this directly

Calls 3

pgit_borrowFunction · 0.85
Error_set_strFunction · 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…