| 2222 | ); |
| 2223 | |
| 2224 | PyObject * |
| 2225 | Repository_apply(Repository *self, PyObject *args, PyObject *kwds) |
| 2226 | { |
| 2227 | Diff *py_diff; |
| 2228 | int location = GIT_APPLY_LOCATION_WORKDIR; |
| 2229 | git_apply_options options = GIT_APPLY_OPTIONS_INIT; |
| 2230 | |
| 2231 | char* keywords[] = {"diff", "location", NULL}; |
| 2232 | |
| 2233 | if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|i", keywords, |
| 2234 | &DiffType, &py_diff, |
| 2235 | &location)) |
| 2236 | return NULL; |
| 2237 | |
| 2238 | int err = git_apply(self->repo, py_diff->diff, location, &options); |
| 2239 | if (err != 0) |
| 2240 | return Error_set(err); |
| 2241 | |
| 2242 | Py_RETURN_NONE; |
| 2243 | } |
| 2244 | |
| 2245 | PyDoc_STRVAR(Repository_applies__doc__, |
| 2246 | "applies(diff: Diff, location: int = GIT_APPLY_LOCATION_INDEX, raise_error: bool = False) -> bool\n" |
nothing calls this directly
no test coverage detected
searching dependent graphs…