1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 08:26:29 +02:00

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:
Junio C Hamano 2010-04-09 22:23:04 -07:00
commit fe7e37235d

View File

@ -162,9 +162,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, $_);