@matheusbsbs / matheus-bagliano / commits / 225a9caf18
Fork 0

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>

Felipe Contreras committed Feb 21, 2009 at 02:49 UTC 225a9caf18911bffe2f32e4960c94e51f135182b
1 file changed +2
builtin-config.c
+2
@@ -374,6 +374,7 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
374 }
375
376 if (actions == ACTION_LIST) {
377 + check_argc(argc, 0, 0);
378 if (git_config(show_all_config, NULL) < 0) {
379 if (config_exclusive_filename)
380 die("unable to read config file %s: %s",
@@ -383,6 +384,7 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
384 }
385 }
386 else if (actions == ACTION_EDIT) {
387 + check_argc(argc, 0, 0);
388 git_config(git_default_config, NULL);
389 launch_editor(config_exclusive_filename ?
390 config_exclusive_filename : git_path("config"),