projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
repo-config: fix segfault with no argument.
[git.git]
/
repo-config.c
diff --git
a/repo-config.c
b/repo-config.c
index
fa8aba7
..
e350630
100644
(file)
--- a/
repo-config.c
+++ b/
repo-config.c
@@
-102,15
+102,14
@@
int main(int argc, const char **argv)
type = T_INT;
else if (!strcmp(argv[1], "--bool"))
type = T_BOOL;
type = T_INT;
else if (!strcmp(argv[1], "--bool"))
type = T_BOOL;
+ else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l"))
+ return git_config(show_all_config);
else
break;
argc--;
argv++;
}
else
break;
argc--;
argv++;
}
- if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l"))
- return git_config(show_all_config);
-
switch (argc) {
case 2:
return get_value(argv[1], NULL);
switch (argc) {
case 2:
return get_value(argv[1], NULL);