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