Merge branch 'mg/maint-send-email-lazy-editor'

* mg/maint-send-email-lazy-editor:
  send-email: lazily assign editor variable
maint
Junio C Hamano 2010-04-03 12:28:42 -07:00
commit aa8b12505b
1 changed files with 4 additions and 1 deletions

View File

@ -166,9 +166,12 @@ my $compose_filename;

# Handle interactive edition of files.
my $multiedit;
my $editor = Git::command_oneline('var', 'GIT_EDITOR');
my $editor;

sub do_edit {
if (!defined($editor)) {
$editor = Git::command_oneline('var', 'GIT_EDITOR');
}
if (defined($multiedit) && !$multiedit) {
map {
system('sh', '-c', $editor.' "$@"', $editor, $_);