Git 2.47-rc0
[git.git] / builtin / update-server-info.c
blob6769611a025d0d69bcd3dbbd06f5fed056262911
1 #define USE_THE_REPOSITORY_VARIABLE
2 #include "builtin.h"
3 #include "config.h"
4 #include "gettext.h"
5 #include "parse-options.h"
6 #include "server-info.h"
8 static const char * const update_server_info_usage[] = {
9 "git update-server-info [-f | --force]",
10 NULL
13 int cmd_update_server_info(int argc,
14 const char **argv,
15 const char *prefix,
16 struct repository *repo UNUSED)
18 int force = 0;
19 struct option options[] = {
20 OPT__FORCE(&force, N_("update the info files from scratch"), 0),
21 OPT_END()
24 git_config(git_default_config, NULL);
25 argc = parse_options(argc, argv, prefix, options,
26 update_server_info_usage, 0);
27 if (argc > 0)
28 usage_with_options(update_server_info_usage, options);
30 return !!update_server_info(force);