MCPcopy Create free account
hub / github.com/git/git / prune

Function prune

builtin/worktree.c:248–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248static int prune(int ac, const char **av, const char *prefix,
249 struct repository *repo UNUSED)
250{
251 struct option options[] = {
252 OPT__DRY_RUN(&show_only, N_("do not remove, show only")),
253 OPT__VERBOSE(&verbose, N_("report pruned working trees")),
254 OPT_EXPIRY_DATE(0, "expire", &expire,
255 N_("prune missing working trees older than <time>")),
256 OPT_END()
257 };
258
259 expire = TIME_MAX;
260 ac = parse_options(ac, av, prefix, options, git_worktree_prune_usage,
261 0);
262 if (ac)
263 usage_with_options(git_worktree_prune_usage, options);
264 prune_worktrees();
265 return 0;
266}
267
268static char *junk_work_tree;
269static char *junk_git_dir;

Callers

nothing calls this directly

Calls 3

parse_optionsFunction · 0.85
usage_with_optionsFunction · 0.85
prune_worktreesFunction · 0.85

Tested by

no test coverage detected