Skip to content

Commit fe7e372

Browse files
committed
Merge branch 'mg/maint-send-email-lazy-editor' into maint
* mg/maint-send-email-lazy-editor: send-email: lazily assign editor variable
2 parents 2e5a40f + 0ce142c commit fe7e372

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-send-email.perl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,12 @@ sub format_2822_time {
162162

163163
# Handle interactive edition of files.
164164
my $multiedit;
165-
my $editor = Git::command_oneline('var', 'GIT_EDITOR');
165+
my $editor;
166166

167167
sub do_edit {
168+
if (!defined($editor)) {
169+
$editor = Git::command_oneline('var', 'GIT_EDITOR');
170+
}
168171
if (defined($multiedit) && !$multiedit) {
169172
map {
170173
system('sh', '-c', $editor.' "$@"', $editor, $_);

0 commit comments

Comments
 (0)