]> git.ipfire.org Git - thirdparty/git.git/blame - builtin/pack-refs.c
Git 2.14.4
[thirdparty/git.git] / builtin / pack-refs.c
CommitLineData
c2e86add 1#include "builtin.h"
b2565ae5 2#include "parse-options.h"
32d462ce 3#include "refs.h"
96884601 4
b2565ae5 5static char const * const pack_refs_usage[] = {
9c9b4f2f 6 N_("git pack-refs [<options>]"),
b2565ae5
PH
7 NULL
8};
9
99b5a79e
LT
10int 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[] = {
e08b7353
NTND
14 OPT_BIT(0, "all", &flags, N_("pack everything"), PACK_REFS_ALL),
15 OPT_BIT(0, "prune", &flags, N_("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);
7c744782 20 return refs_pack_refs(get_main_ref_store(), flags);
e1e22e37 21}