| 66 | "\n" |
| 67 | "Prune a worktree object."); |
| 68 | PyObject * |
| 69 | Worktree_prune(Worktree *self, PyObject *args) |
| 70 | { |
| 71 | int err, force = 0; |
| 72 | git_worktree_prune_options prune_opts; |
| 73 | |
| 74 | if (!PyArg_ParseTuple(args, "|i", &force)) |
| 75 | return NULL; |
| 76 | |
| 77 | git_worktree_prune_options_init(&prune_opts, GIT_WORKTREE_PRUNE_OPTIONS_VERSION); |
| 78 | prune_opts.flags = force & (GIT_WORKTREE_PRUNE_VALID | GIT_WORKTREE_PRUNE_LOCKED); |
| 79 | |
| 80 | err = git_worktree_prune(self->worktree, &prune_opts); |
| 81 | if (err < 0) |
| 82 | return Error_set(err); |
| 83 | |
| 84 | Py_RETURN_NONE; |
| 85 | } |
| 86 | |
| 87 | static void |
| 88 | Worktree_dealloc(Worktree *self) |
nothing calls this directly
no test coverage detected
searching dependent graphs…