]>
Commit | Line | Data |
---|---|---|
c2e86add | 1 | #include "builtin.h" |
b2565ae5 | 2 | #include "parse-options.h" |
32d462ce | 3 | #include "refs.h" |
23a3f0cb | 4 | #include "repository.h" |
96884601 | 5 | |
b2565ae5 | 6 | static char const * const pack_refs_usage[] = { |
9c9b4f2f | 7 | N_("git pack-refs [<options>]"), |
b2565ae5 PH |
8 | NULL |
9 | }; | |
10 | ||
99b5a79e LT |
11 | int cmd_pack_refs(int argc, const char **argv, const char *prefix) |
12 | { | |
68dce6e9 | 13 | unsigned int flags = PACK_REFS_PRUNE; |
b2565ae5 | 14 | struct option opts[] = { |
e08b7353 NTND |
15 | OPT_BIT(0, "all", &flags, N_("pack everything"), PACK_REFS_ALL), |
16 | OPT_BIT(0, "prune", &flags, N_("prune loose refs (default)"), PACK_REFS_PRUNE), | |
b2565ae5 PH |
17 | OPT_END(), |
18 | }; | |
37782920 | 19 | if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0)) |
b2565ae5 | 20 | usage_with_options(pack_refs_usage, opts); |
23a3f0cb | 21 | return refs_pack_refs(get_main_ref_store(the_repository), flags); |
e1e22e37 | 22 | } |