]> git.ipfire.org Git - thirdparty/git.git/blob - builtin/prune-packed.c
Start the 2.46 cycle
[thirdparty/git.git] / builtin / prune-packed.c
1 #include "builtin.h"
2 #include "parse-options.h"
3 #include "prune-packed.h"
4
5 static const char * const prune_packed_usage[] = {
6 N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),
7 NULL
8 };
9
10 int cmd_prune_packed(int argc, const char **argv, const char *prefix)
11 {
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()
19 };
20
21 argc = parse_options(argc, argv, prefix, prune_packed_options,
22 prune_packed_usage, 0);
23
24 if (argc > 0)
25 usage_msg_opt(_("too many arguments"),
26 prune_packed_usage,
27 prune_packed_options);
28
29 prune_packed_objects(opts);
30 return 0;
31 }