]>
Commit | Line | Data |
---|---|---|
25f38f06 | 1 | #include "builtin.h" |
7cfe0c98 | 2 | #include "parse-options.h" |
9460fd48 | 3 | #include "prune-packed.h" |
2396ec85 | 4 | |
7cfe0c98 | 5 | static const char * const prune_packed_usage[] = { |
9c9b4f2f | 6 | N_("git prune-packed [-n | --dry-run] [-q | --quiet]"), |
7cfe0c98 SB |
7 | NULL |
8 | }; | |
51890a64 | 9 | |
25f38f06 | 10 | int cmd_prune_packed(int argc, const char **argv, const char *prefix) |
2396ec85 | 11 | { |
af0b4a3b | 12 | int opts = isatty(2) ? PRUNE_PACKED_VERBOSE : 0; |
7cfe0c98 | 13 | const struct option prune_packed_options[] = { |
af0b4a3b NTND |
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), | |
7cfe0c98 SB |
18 | OPT_END() |
19 | }; | |
2396ec85 | 20 | |
7cfe0c98 SB |
21 | argc = parse_options(argc, argv, prefix, prune_packed_options, |
22 | prune_packed_usage, 0); | |
2396ec85 | 23 | |
9b0bd87e RJ |
24 | if (argc > 0) |
25 | usage_msg_opt(_("too many arguments"), | |
26 | prune_packed_usage, | |
27 | prune_packed_options); | |
28 | ||
b60daf05 | 29 | prune_packed_objects(opts); |
2396ec85 LT |
30 | return 0; |
31 | } |