Code

Introduce an unlink(2) wrapper which gives warning if unlink failed
[git.git] / update-server-info.c
1 #include "cache.h"
2 #include "exec_cmd.h"
4 static const char update_server_info_usage[] =
5 "git update-server-info [--force]";
7 int main(int ac, char **av)
8 {
9         int i;
10         int force = 0;
11         for (i = 1; i < ac; i++) {
12                 if (av[i][0] == '-') {
13                         if (!strcmp("--force", av[i]) ||
14                             !strcmp("-f", av[i]))
15                                 force = 1;
16                         else
17                                 usage(update_server_info_usage);
18                 }
19         }
20         if (i != ac)
21                 usage(update_server_info_usage);
23         git_extract_argv0_path(av[0]);
25         setup_git_directory();
27         return !!update_server_info(force);
28 }