sequencer: allow disabling conflict advice
[alt-git.git] / builtin / prune-packed.c
blobca3578e158840148aea2b074a3d44fdc64332b58
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, 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),
19 OPT_END()
22 argc = parse_options(argc, argv, prefix, prune_packed_options,
23 prune_packed_usage, 0);
25 if (argc > 0)
26 usage_msg_opt(_("too many arguments"),
27 prune_packed_usage,
28 prune_packed_options);
30 prune_packed_objects(opts);
31 return 0;