| 2262 | ); |
| 2263 | |
| 2264 | PyObject * |
| 2265 | Repository_applies(Repository *self, PyObject *args, PyObject *kwds) |
| 2266 | { |
| 2267 | Diff *py_diff; |
| 2268 | int location = GIT_APPLY_LOCATION_INDEX; |
| 2269 | int raise_error = 0; |
| 2270 | git_apply_options options = GIT_APPLY_OPTIONS_INIT; |
| 2271 | options.flags |= GIT_APPLY_CHECK; |
| 2272 | |
| 2273 | char* keywords[] = {"diff", "location", "raise_error", NULL}; |
| 2274 | |
| 2275 | if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|ii", keywords, |
| 2276 | &DiffType, &py_diff, |
| 2277 | &location, &raise_error)) |
| 2278 | return NULL; |
| 2279 | |
| 2280 | int err = git_apply(self->repo, ((Diff*)py_diff)->diff, location, &options); |
| 2281 | if (err != 0) { |
| 2282 | if (raise_error) |
| 2283 | return Error_set(err); |
| 2284 | else |
| 2285 | Py_RETURN_FALSE; |
| 2286 | } |
| 2287 | |
| 2288 | Py_RETURN_TRUE; |
| 2289 | } |
| 2290 | |
| 2291 | PyDoc_STRVAR(Repository_set_odb__doc__, |
| 2292 | "set_odb(odb: Odb)\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…