Coverage Report

Created: 2024-09-08 06:23

/src/git/builtin/prune-packed.c
Line
Count
Source (jump to first uncovered line)
1
#include "builtin.h"
2
#include "gettext.h"
3
#include "parse-options.h"
4
#include "prune-packed.h"
5
6
static const char * const prune_packed_usage[] = {
7
  "git prune-packed [-n | --dry-run] [-q | --quiet]",
8
  NULL
9
};
10
11
int cmd_prune_packed(int argc, const char **argv, const char *prefix)
12
0
{
13
0
  int opts = isatty(2) ? PRUNE_PACKED_VERBOSE : 0;
14
0
  const struct option prune_packed_options[] = {
15
0
    OPT_BIT('n', "dry-run", &opts, N_("dry run"),
16
0
      PRUNE_PACKED_DRY_RUN),
17
0
    OPT_NEGBIT('q', "quiet", &opts, N_("be quiet"),
18
0
         PRUNE_PACKED_VERBOSE),
19
0
    OPT_END()
20
0
  };
21
22
0
  argc = parse_options(argc, argv, prefix, prune_packed_options,
23
0
           prune_packed_usage, 0);
24
25
0
  if (argc > 0)
26
0
    usage_msg_opt(_("too many arguments"),
27
0
            prune_packed_usage,
28
0
            prune_packed_options);
29
30
0
  prune_packed_objects(opts);
31
0
  return 0;
32
0
}