diff options
-rwxr-xr-x | git-send-email.perl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index 4f5da4ecf2..0d53b65300 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -162,9 +162,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, $_); |