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

Function pygit2_refdb_backend_has_log

src/refdb_backend.c:301–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301static int
302pygit2_refdb_backend_has_log(git_refdb_backend *_be, const char *refname)
303{
304 int err;
305 PyObject *args, *result;
306 struct pygit2_refdb_backend *be = (struct pygit2_refdb_backend *)_be;
307
308 if ((args = Py_BuildValue("(s)", refname)) == NULL) {
309 return GIT_EUSER;
310 }
311 result = PyObject_CallObject(be->has_log, args);
312 Py_DECREF(args);
313
314 if ((err = git_error_for_exc()) != 0) {
315 return err;
316 }
317
318 if (PyObject_IsTrue(result)) {
319 Py_DECREF(result);
320 return 1;
321 }
322
323 Py_DECREF(result);
324 return 0;
325}
326
327static int
328pygit2_refdb_backend_ensure_log(git_refdb_backend *_be, const char *refname)

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…