diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2009-10-31 02:42:34 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-11-13 21:20:50 +0100 |
commit | b4479f074760a788dd4e353b8c86a7d735afc53e (patch) | |
tree | 5680844fb47dd256945296a8466de81a4bfb17ec /git-send-email.perl | |
parent | Teach git var about GIT_PAGER (diff) | |
download | git-b4479f074760a788dd4e353b8c86a7d735afc53e.tar.xz git-b4479f074760a788dd4e353b8c86a7d735afc53e.zip |
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 <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 3 |
1 files changed, 2 insertions, 1 deletions
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 { |