Skip to content

Commit

Permalink
Merge branch 'mg/maint-send-email-lazy-editor' into maint
Browse files Browse the repository at this point in the history
* mg/maint-send-email-lazy-editor:
  send-email: lazily assign editor variable
  • Loading branch information
Junio C Hamano committed Apr 10, 2010
2 parents 2e5a40f + 0ce142c commit fe7e372
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,12 @@ sub format_2822_time {

# 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, $_);
Expand Down

0 comments on commit fe7e372

Please sign in to comment.