Coverage Report

Created: 2024-09-08 06:24

/src/git/builtin/update-server-info.c
Line
Count
Source (jump to first uncovered line)
1
#include "builtin.h"
2
#include "config.h"
3
#include "gettext.h"
4
#include "parse-options.h"
5
#include "server-info.h"
6
7
static const char * const update_server_info_usage[] = {
8
  "git update-server-info [-f | --force]",
9
  NULL
10
};
11
12
int cmd_update_server_info(int argc, const char **argv, const char *prefix)
13
0
{
14
0
  int force = 0;
15
0
  struct option options[] = {
16
0
    OPT__FORCE(&force, N_("update the info files from scratch"), 0),
17
0
    OPT_END()
18
0
  };
19
20
0
  git_config(git_default_config, NULL);
21
0
  argc = parse_options(argc, argv, prefix, options,
22
0
           update_server_info_usage, 0);
23
0
  if (argc > 0)
24
0
    usage_with_options(update_server_info_usage, options);
25
26
0
  return !!update_server_info(force);
27
0
}