Sync with 2.40.2
[git.git] / builtin / update-server-info.c
blob19dce3c06552e2e3d120b27b4563ebadf02dc18c
1 #include "cache.h"
2 #include "config.h"
3 #include "builtin.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, const char **argv, const char *prefix)
15 int force = 0;
16 struct option options[] = {
17 OPT__FORCE(&force, N_("update the info files from scratch"), 0),
18 OPT_END()
21 git_config(git_default_config, NULL);
22 argc = parse_options(argc, argv, prefix, options,
23 update_server_info_usage, 0);
24 if (argc > 0)
25 usage_with_options(update_server_info_usage, options);
27 return !!update_server_info(force);