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

Function pygit2_refdb_backend_ensure_log

src/refdb_backend.c:327–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327static int
328pygit2_refdb_backend_ensure_log(git_refdb_backend *_be, const char *refname)
329{
330 int err;
331 PyObject *args, *result;
332 struct pygit2_refdb_backend *be = (struct pygit2_refdb_backend *)_be;
333
334 if ((args = Py_BuildValue("(s)", refname)) == NULL) {
335 return GIT_EUSER;
336 }
337 result = PyObject_CallObject(be->ensure_log, args);
338 Py_DECREF(args);
339
340 if ((err = git_error_for_exc()) != 0) {
341 return err;
342 }
343
344 if (PyObject_IsTrue(result)) {
345 Py_DECREF(result);
346 return 1;
347 }
348
349 Py_DECREF(result);
350 return 0;
351}
352
353static int
354pygit2_refdb_backend_reflog_read(git_reflog **out,

Callers

nothing calls this directly

Calls 1

git_error_for_excFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…