aboutsummaryrefslogtreecommitdiff
path: root/builtin-config.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-02-21 02:48:54 +0200
committerJunio C Hamano <gitster@pobox.com>2009-02-21 20:35:48 -0800
commit414f2e5337b0b78a47f021cb734e9ba4934c0b28 (patch)
tree24bbd79aa1dd95fd197ddb380f9fbd41a7effc78 /builtin-config.c
parent4b951b7eb0a4abf7db301bc6dbf8a0cf1b0057d0 (diff)
downloadgit-414f2e5337b0b78a47f021cb734e9ba4934c0b28.tar.gz
git-414f2e5337b0b78a47f021cb734e9ba4934c0b28.tar.xz
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>
Diffstat (limited to 'builtin-config.c')
-rw-r--r--builtin-config.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/builtin-config.c b/builtin-config.c
index afc4393b1..d52a05744 100644
--- a/builtin-config.c
+++ b/builtin-config.c
@@ -363,15 +363,12 @@ int cmd_config(int argc, const char **argv, const char *prefix)
} else if (!strcmp(argv[1], "--get-colorbool")) {
return get_colorbool(argc-2, argv+2);
} else if (!strcmp(argv[1], "--edit") || !strcmp(argv[1], "-e")) {
- const char *config_filename;
if (argc != 2)
usage(git_config_set_usage);
- if (config_exclusive_filename)
- config_filename = config_exclusive_filename;
- else
- config_filename = git_path("config");
git_config(git_default_config, NULL);
- launch_editor(config_filename, NULL, NULL);
+ launch_editor(config_exclusive_filename ?
+ config_exclusive_filename : git_path("config"),
+ NULL, NULL);
return 0;
} else
break;