builtin/show: do not prune by pathspec
[git/mjg.git] / builtin / prune-packed.c
blob4d63f26b0a120caf54ec8ca404be7c0d3d877a8d
1 #include "builtin.h"
2 #include "gettext.h"
3 #include "parse-options.h"
4 #include "prune-packed.h"
6 static const char * const prune_packed_usage[] = {
7 "git prune-packed [-n | --dry-run] [-q | --quiet]",
8 NULL
9 };
11 int cmd_prune_packed(int argc,
12 const char **argv,
13 const char *prefix,
14 struct repository *repo UNUSED)
16 int opts = isatty(2) ? PRUNE_PACKED_VERBOSE : 0;
17 const struct option prune_packed_options[] = {
18 OPT_BIT('n', "dry-run", &opts, N_("dry run"),
19 PRUNE_PACKED_DRY_RUN),
20 OPT_NEGBIT('q', "quiet", &opts, N_("be quiet"),
21 PRUNE_PACKED_VERBOSE),
22 OPT_END()
25 argc = parse_options(argc, argv, prefix, prune_packed_options,
26 prune_packed_usage, 0);
28 if (argc > 0)
29 usage_msg_opt(_("too many arguments"),
30 prune_packed_usage,
31 prune_packed_options);
33 prune_packed_objects(opts);
34 return 0;