summaryrefslogtreecommitdiff
path: root/builtin-config.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2009-02-21 02:49:28 +0200
committerJunio C Hamano <gitster@pobox.com>2009-02-21 20:37:47 -0800
commit225a9caf18911bffe2f32e4960c94e51f135182b (patch)
tree211908921ca827721991b9a7c9934210ec843db5 /builtin-config.c
parent16c1e939856f6ced97c60beb64936d564d198be3 (diff)
downloadgit-225a9caf18911bffe2f32e4960c94e51f135182b.tar.gz
git config: don't allow extra arguments for -e or -l.
As suggested by Johannes Schindelin. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-config.c')
-rw-r--r--builtin-config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-config.c b/builtin-config.c
index 6dc205d1f4..a3a334bc63 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -374,6 +374,7 @@ 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) {
if (config_exclusive_filename)
die("unable to read config file %s: %s",
@@ -383,6 +384,7 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
}
}
else if (actions == ACTION_EDIT) {
+ check_argc(argc, 0, 0);
git_config(git_default_config, NULL);
launch_editor(config_exclusive_filename ?
config_exclusive_filename : git_path("config"),