summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-07-20 12:06:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-21 23:51:14 (GMT)
commit4d87b9c5db2590f7616fedfc0a538fc78f528e14 (patch)
treee6422ae717c460cb0e53852507af05dec979328d /config.c
parent62e09ce998dd7f6b844deb650101c743a5c4ce50 (diff)
downloadgit-4d87b9c5db2590f7616fedfc0a538fc78f528e14.zip
git-4d87b9c5db2590f7616fedfc0a538fc78f528e14.tar.gz
git-4d87b9c5db2590f7616fedfc0a538fc78f528e14.tar.bz2
launch_editor(): Heed GIT_EDITOR and core.editor settings
In the commit 'Add GIT_EDITOR environment and core.editor configuration variables', this was done for the shell scripts. Port it over to builtin-tag's version of launch_editor(), which is just about to be refactored into editor.c. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index f89a611..103b4fc 100644
--- a/config.c
+++ b/config.c
@@ -426,6 +426,11 @@ int git_default_config(const char *var, const char *value)
return 0;
}
+ if (!strcmp(var, "core.editor")) {
+ editor_program = xstrdup(value);
+ return 0;
+ }
+
/* Add other config variables here and to Documentation/config.txt. */
return 0;
}