Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-10-06 00:16:44 +0400
committerShawn O. Pearce <spearce@spearce.org>2007-10-16 04:54:42 +0400
commita72c874e43e89a879fc4a8998ecd6e5a56667929 (patch)
tree423474ef2bf3e0280ffd6dc754797d485c7f22b3 /builtin-config.c
parent304b5af64f9b5a6b5e9455e2dcab381c568452b6 (diff)
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 <frank@lichtenheld.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-config.c')
-rw-r--r--builtin-config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-config.c b/builtin-config.c
index 0a605e01ac..cb7e9e9391 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) {