MCPcopy Create free account
hub / github.com/libgit2/pygit2 / Worktree_prune

Function Worktree_prune

src/worktree.c:68–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 "\n"
67 "Prune a worktree object.");
68PyObject *
69Worktree_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
87static void
88Worktree_dealloc(Worktree *self)

Callers

nothing calls this directly

Calls 1

Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…