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

Function pygit2_refdb_backend_exists

src/refdb_backend.c:156–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156static int
157pygit2_refdb_backend_exists(int *exists,
158 git_refdb_backend *_be, const char *ref_name)
159{
160 int err;
161 PyObject *args, *result;
162 struct pygit2_refdb_backend *be = (struct pygit2_refdb_backend *)_be;
163
164 if ((args = Py_BuildValue("(s)", ref_name)) == NULL)
165 return GIT_EUSER;
166 result = PyObject_CallObject(be->exists, args);
167 Py_DECREF(args);
168
169 if ((err = git_error_for_exc()) != 0)
170 goto out;
171
172 *exists = PyObject_IsTrue(result);
173
174out:
175 Py_DECREF(result);
176 return 0;
177}
178
179static int
180pygit2_refdb_backend_lookup(git_reference **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…