Thread (11 messages) flat view 11 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH v2 6/8] config: Don't allow extra arguments for -e or -l.

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:46:13
Subsystem: the rest · Maintainer: Linus Torvalds

As suggested by Johannes Schindelin.

Signed-off-by: Felipe Contreras <redacted>
---
 builtin-config.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin-config.c b/builtin-config.c
index cdd8a12..5891a4e 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -363,10 +363,12 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
 		}
 
 	if (actions & ACTION_LIST) {
+		check_argc(argc, 0, 0);
 		if (git_config(show_all_config, NULL) < 0)
 			die("error processing config file(s)");
 	}
 	else if (actions & ACTION_EDIT) {
+		check_argc(argc, 0, 0);
 		const char *config_filename;
 		if (config_exclusive_filename)
 			config_filename = config_exclusive_filename;
-- 
1.6.1.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help