Merge branch 'ss/clone-guess-dir-name-simplify'
[git/debian.git] / builtin / pack-refs.c
blob39f9a55d16736d93b43e6aa16a33634039e55de4
1 #include "builtin.h"
2 #include "parse-options.h"
3 #include "refs.h"
5 static char const * const pack_refs_usage[] = {
6 N_("git pack-refs [<options>]"),
7 NULL
8 };
10 int cmd_pack_refs(int argc, const char **argv, const char *prefix)
12 unsigned int flags = PACK_REFS_PRUNE;
13 struct option opts[] = {
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),
16 OPT_END(),
18 if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0))
19 usage_with_options(pack_refs_usage, opts);
20 return pack_refs(flags);