From: Frank Lichtenheld Date: Fri, 5 Oct 2007 20:16:44 +0000 (+0200) Subject: git-config: don't silently ignore options after --list X-Git-Tag: v1.5.3.5~54 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a72c874e43e89a879fc4a8998ecd6e5a56667929;p=git.git git-config: don't silently ignore options after --list Error out if someone gives options after --list since that is not a valid syntax. Signed-off-by: Frank Lichtenheld Signed-off-by: Lars Hjemli Signed-off-by: Shawn O. Pearce --- diff --git a/builtin-config.c b/builtin-config.c index 0a605e01a..cb7e9e939 100644 --- a/builtin-config.c +++ b/builtin-config.c @@ -172,8 +172,11 @@ int cmd_config(int argc, const char **argv, const char *prefix) type = T_INT; else if (!strcmp(argv[1], "--bool")) type = T_BOOL; - else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) + else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) { + if (argc != 2) + usage(git_config_set_usage); return git_config(show_all_config); + } else if (!strcmp(argv[1], "--global")) { char *home = getenv("HOME"); if (home) {