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