2 #include "parse-options.h"
3 #include "prune-packed.h"
5 static const char * const prune_packed_usage
[] = {
6 N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),
10 int cmd_prune_packed(int argc
, const char **argv
, const char *prefix
)
12 int opts
= isatty(2) ? PRUNE_PACKED_VERBOSE
: 0;
13 const struct option prune_packed_options
[] = {
14 OPT_BIT('n', "dry-run", &opts
, N_("dry run"),
15 PRUNE_PACKED_DRY_RUN
),
16 OPT_NEGBIT('q', "quiet", &opts
, N_("be quiet"),
17 PRUNE_PACKED_VERBOSE
),
21 argc
= parse_options(argc
, argv
, prefix
, prune_packed_options
,
22 prune_packed_usage
, 0);
25 usage_msg_opt(_("too many arguments"),
27 prune_packed_options
);
29 prune_packed_objects(opts
);