| 154 | } |
| 155 | |
| 156 | static int |
| 157 | pygit2_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 | |
| 174 | out: |
| 175 | Py_DECREF(result); |
| 176 | return 0; |
| 177 | } |
| 178 | |
| 179 | static int |
| 180 | pygit2_refdb_backend_lookup(git_reference **out, |
nothing calls this directly
no test coverage detected
searching dependent graphs…