Skip to content

Commit aa8b125

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

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
@@ -166,9 +166,12 @@ sub format_2822_time {
166166

167167
# Handle interactive edition of files.
168168
my $multiedit;
169-
my $editor = Git::command_oneline('var', 'GIT_EDITOR');
169+
my $editor;
170170

171171
sub do_edit {
172+
if (!defined($editor)) {
173+
$editor = Git::command_oneline('var', 'GIT_EDITOR');
174+
}
172175
if (defined($multiedit) && !$multiedit) {
173176
map {
174177
system('sh', '-c', $editor.' "$@"', $editor, $_);

0 commit comments

Comments
 (0)