Merge branch 'js/branch-track-inherit'
[git/debian.git] / builtin / prune-packed.c
blobb7b9281a8cea2c009ef9a4487094613f032f6aba
1 #include "builtin.h"
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]"),
7 NULL
8 };
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),
18 OPT_END()
21 argc = parse_options(argc, argv, prefix, prune_packed_options,
22 prune_packed_usage, 0);
24 if (argc > 0)
25 usage_msg_opt(_("too many arguments"),
26 prune_packed_usage,
27 prune_packed_options);
29 prune_packed_objects(opts);
30 return 0;