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
,
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
),
25 argc
= parse_options(argc
, argv
, prefix
, prune_packed_options
,
26 prune_packed_usage
, 0);
29 usage_msg_opt(_("too many arguments"),
31 prune_packed_options
);
33 prune_packed_objects(opts
);