Git fork
at reftables-rust 32 lines 753 B view raw
1#include "builtin.h" 2#include "config.h" 3#include "environment.h" 4#include "gettext.h" 5#include "parse-options.h" 6#include "server-info.h" 7 8static const char * const update_server_info_usage[] = { 9 "git update-server-info [-f | --force]", 10 NULL 11}; 12 13int cmd_update_server_info(int argc, 14 const char **argv, 15 const char *prefix, 16 struct repository *repo) 17{ 18 int force = 0; 19 struct option options[] = { 20 OPT__FORCE(&force, N_("update the info files from scratch"), 0), 21 OPT_END() 22 }; 23 24 repo_config(repo, git_default_config, NULL); 25 26 argc = parse_options(argc, argv, prefix, options, 27 update_server_info_usage, 0); 28 if (argc > 0) 29 usage_with_options(update_server_info_usage, options); 30 31 return !!update_server_info(repo, force); 32}