@matheusbsbs / matheus-bagliano / commits / 414f2e5337
Fork 0

git config: trivial cleanup for editor action

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Feb 21, 2009 at 02:48 UTC 414f2e5337b0b78a47f021cb734e9ba4934c0b28
1 file changed +3 -6
builtin-config.c
+3 -6
@@ -363,15 +363,12 @@ int cmd_config(int argc, const char **argv, const char *prefix)
363 } else if (!strcmp(argv[1], "--get-colorbool")) {
364 return get_colorbool(argc-2, argv+2);
365 } else if (!strcmp(argv[1], "--edit") || !strcmp(argv[1], "-e")) {
366 - const char *config_filename;
366 if (argc != 2)
367 usage(git_config_set_usage);
369 - if (config_exclusive_filename)
370 - config_filename = config_exclusive_filename;
371 - else
372 - config_filename = git_path("config");
368 git_config(git_default_config, NULL);
374 - launch_editor(config_filename, NULL, NULL);
369 + launch_editor(config_exclusive_filename ?
370 + config_exclusive_filename : git_path("config"),
371 + NULL, NULL);
372 return 0;
373 } else
374 break;