builtin-pack-refs.con commit git checkout: don't warn about unborn branch if -f is already passed (1510dbe)
   1#include "cache.h"
   2#include "parse-options.h"
   3#include "pack-refs.h"
   4
   5static char const * const pack_refs_usage[] = {
   6        "git pack-refs [options]",
   7        NULL
   8};
   9
  10int cmd_pack_refs(int argc, const char **argv, const char *prefix)
  11{
  12        unsigned int flags = PACK_REFS_PRUNE;
  13        struct option opts[] = {
  14                OPT_BIT(0, "all",   &flags, "pack everything", PACK_REFS_ALL),
  15                OPT_BIT(0, "prune", &flags, "prune loose refs (default)", PACK_REFS_PRUNE),
  16                OPT_END(),
  17        };
  18        if (parse_options(argc, argv, opts, pack_refs_usage, 0))
  19                usage_with_options(pack_refs_usage, opts);
  20        return pack_refs(flags);
  21}