Add documentation for git-config-set
[alt-git.git] / config-set.c
blob1b1547b5344657249e6f45c70072f50b91852d94
1 #include "cache.h"
3 static const char git_config_set_usage[] =
4 "git-config-set name [value [value_regex]] | --unset name [value_regex]";
6 int main(int argc, const char **argv)
8 setup_git_directory();
9 switch (argc) {
10 case 2:
11 return git_config_set(argv[1], NULL);
12 case 3:
13 if (!strcmp(argv[1], "--unset"))
14 return git_config_set(argv[2], NULL);
15 else
16 return git_config_set(argv[1], argv[2]);
17 case 4:
18 if (!strcmp(argv[1], "--unset"))
19 return git_config_set_multivar(argv[2], NULL, argv[3]);
20 else
21 return git_config_set_multivar(argv[1], argv[2], argv[3]);
22 default:
23 usage(git_config_set_usage);
25 return 0;