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

Function Reference_log

src/reference.c:457–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455 "Retrieves the current reference log.");
456
457PyObject *
458Reference_log(Reference *self)
459{
460 int err;
461 RefLogIter *iter;
462 git_repository *repo;
463
464 CHECK_REFERENCE(self);
465
466 repo = git_reference_owner(self->reference);
467 iter = PyObject_New(RefLogIter, &RefLogIterType);
468 if (iter != NULL) {
469 err = git_reflog_read(&iter->reflog, repo, git_reference_name(self->reference));
470 if (err < 0)
471 return Error_set(err);
472
473 iter->size = git_reflog_entrycount(iter->reflog);
474 iter->i = 0;
475 }
476 return (PyObject*)iter;
477}
478
479PyDoc_STRVAR(Reference_peel__doc__,
480 "peel(type=None) -> Object\n"

Callers

nothing calls this directly

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…