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>
This commit is contained in:
Felipe Contreras 2009-02-21 02:49:28 +02:00 committed by Junio C Hamano
parent 16c1e93985
commit 225a9caf18

View file

@ -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"),