Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
repo-config: fix segfault with no argument.
author
Johannes Schindelin
<Johannes.Schindelin@gmx.de>
Tue, 2 May 2006 19:54:12 +0000
(12:54 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Tue, 2 May 2006 19:54:12 +0000
(12:54 -0700)
An earlier addition of --list feature was carelessly done and
caused an invalid access to argv[1] when it was not given.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
repo-config.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
746437d
)
diff --git
a/repo-config.c
b/repo-config.c
index fa8aba7a1b8760f0316ef0d47c40b0078316ff57..e35063034fc94ac14722a0bb8c544d3c5134a9ec 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;
+ else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l"))
+ return git_config(show_all_config);
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);