| 222 | " the hunks will be merged into a one.\n"); |
| 223 | |
| 224 | PyObject * |
| 225 | Tree_diff_to_workdir(Tree *self, PyObject *args, PyObject *kwds) |
| 226 | { |
| 227 | git_diff_options opts = GIT_DIFF_OPTIONS_INIT; |
| 228 | git_diff *diff; |
| 229 | int err; |
| 230 | |
| 231 | char *keywords[] = {"flags", "context_lines", "interhunk_lines", NULL}; |
| 232 | |
| 233 | if (!PyArg_ParseTupleAndKeywords(args, kwds, "|IHH", keywords, &opts.flags, |
| 234 | &opts.context_lines, &opts.interhunk_lines)) |
| 235 | return NULL; |
| 236 | |
| 237 | if (Object__load((Object*)self) == NULL) { return NULL; } // Lazy load |
| 238 | |
| 239 | err = git_diff_tree_to_workdir(&diff, self->repo->repo, self->tree, &opts); |
| 240 | if (err < 0) |
| 241 | return Error_set(err); |
| 242 | |
| 243 | return wrap_diff(diff, self->repo); |
| 244 | } |
| 245 | |
| 246 | |
| 247 | PyDoc_STRVAR(Tree_diff_to_index__doc__, |
nothing calls this directly
no test coverage detected
searching dependent graphs…