| 246 | } |
| 247 | |
| 248 | static 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 | |
| 268 | static char *junk_work_tree; |
| 269 | static char *junk_git_dir; |
nothing calls this directly
no test coverage detected