Skip to content

Commit

Permalink
Merge branch 'mg/maint-send-email-lazy-editor'
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 3, 2010
2 parents 4de113c + 0ce142c commit aa8b125
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 @@ -166,9 +166,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 aa8b125

Please sign in to comment.