Merge branch 'mh/doc-credential-cache-only-in-core'
[alt-git.git] / builtin / update-server-info.c
blobd2239c9ef4dac2b65c3875ce8b8cf0481516615f
1 #include "cache.h"
2 #include "config.h"
3 #include "builtin.h"
4 #include "parse-options.h"
6 static const char * const update_server_info_usage[] = {
7 "git update-server-info [-f | --force]",
8 NULL
9 };
11 int cmd_update_server_info(int argc, const char **argv, const char *prefix)
13 int force = 0;
14 struct option options[] = {
15 OPT__FORCE(&force, N_("update the info files from scratch"), 0),
16 OPT_END()
19 git_config(git_default_config, NULL);
20 argc = parse_options(argc, argv, prefix, options,
21 update_server_info_usage, 0);
22 if (argc > 0)
23 usage_with_options(update_server_info_usage, options);
25 return !!update_server_info(force);