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]",
11 int cmd_prune_packed(int argc
, const char **argv
, const char *prefix
)
13 int opts
= isatty(2) ? PRUNE_PACKED_VERBOSE
: 0;
14 const struct option prune_packed_options
[] = {
15 OPT_BIT('n', "dry-run", &opts
, N_("dry run"),
16 PRUNE_PACKED_DRY_RUN
),
17 OPT_NEGBIT('q', "quiet", &opts
, N_("be quiet"),
18 PRUNE_PACKED_VERBOSE
),
22 argc
= parse_options(argc
, argv
, prefix
, prune_packed_options
,
23 prune_packed_usage
, 0);
26 usage_msg_opt(_("too many arguments"),
28 prune_packed_options
);
30 prune_packed_objects(opts
);