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>
This commit is contained in:
Johannes Schindelin
2007-07-20 13:06:09 +01:00
committed by Junio C Hamano
parent 62e09ce998
commit 4d87b9c5db
4 changed files with 15 additions and 3 deletions

View File

@ -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;
}