From b4479f074760a788dd4e353b8c86a7d735afc53e Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Fri, 30 Oct 2009 20:42:34 -0500 Subject: add -i, send-email, svn, p4, etc: use "git var GIT_EDITOR" Use the new "git var GIT_EDITOR" feature to decide what editor to use, instead of duplicating its logic elsewhere. This should make the behavior of commands in edge cases (e.g., editor names with spaces) a little more consistent. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- git-send-email.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git-send-email.perl') diff --git a/git-send-email.perl b/git-send-email.perl index a0279de687..4f5da4ecf2 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -162,7 +162,8 @@ my $compose_filename; # Handle interactive edition of files. my $multiedit; -my $editor = $ENV{GIT_EDITOR} || Git::config(@repo, "core.editor") || $ENV{VISUAL} || $ENV{EDITOR} || "vi"; +my $editor = Git::command_oneline('var', 'GIT_EDITOR'); + sub do_edit { if (defined($multiedit) && !$multiedit) { map { -- cgit v1.2.3