Merge branch 'tq/branch-style-fix' into maint
[git.git] / builtin / pack-refs.c
blobf3353564f99205b278362484abcdf1537058ef29
1 #include "builtin.h"
2 #include "parse-options.h"
3 #include "refs.h"
4 #include "repository.h"
6 static char const * const pack_refs_usage[] = {
7 N_("git pack-refs [<options>]"),
8 NULL
9 };
11 int cmd_pack_refs(int argc, const char **argv, const char *prefix)
13 unsigned int flags = PACK_REFS_PRUNE;
14 struct option opts[] = {
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),
17 OPT_END(),
19 if (parse_options(argc, argv, prefix, opts, pack_refs_usage, 0))
20 usage_with_options(pack_refs_usage, opts);
21 return refs_pack_refs(get_main_ref_store(the_repository), flags);