Merge branch 'mg/maint-send-email-lazy-editor' into maint
* mg/maint-send-email-lazy-editor: send-email: lazily assign editor variable
This commit is contained in:
commit
fe7e37235d
@ -162,9 +162,12 @@ my $compose_filename;
|
|||||||
|
|
||||||
# Handle interactive edition of files.
|
# Handle interactive edition of files.
|
||||||
my $multiedit;
|
my $multiedit;
|
||||||
my $editor = Git::command_oneline('var', 'GIT_EDITOR');
|
my $editor;
|
||||||
|
|
||||||
sub do_edit {
|
sub do_edit {
|
||||||
|
if (!defined($editor)) {
|
||||||
|
$editor = Git::command_oneline('var', 'GIT_EDITOR');
|
||||||
|
}
|
||||||
if (defined($multiedit) && !$multiedit) {
|
if (defined($multiedit) && !$multiedit) {
|
||||||
map {
|
map {
|
||||||
system('sh', '-c', $editor.' "$@"', $editor, $_);
|
system('sh', '-c', $editor.' "$@"', $editor, $_);
|
||||||
|
Loading…
Reference in New Issue
Block a user