Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-04-10 09:23:04 +0400
committerJunio C Hamano <gitster@pobox.com>2010-04-10 09:23:04 +0400
commitfe7e37235dd9b36402afeccb24bbced933e847d7 (patch)
treef49815418e36e60b5d6b54fd04157b1598cd6b0d
parent2e5a40f0b59af243f83a14bf1db4b7f833c6c49d (diff)
parent0ce142c944181236f99ea3f7fc72712f3e43d2e2 (diff)
Merge branch 'mg/maint-send-email-lazy-editor' into maint
* mg/maint-send-email-lazy-editor: send-email: lazily assign editor variable
-rwxr-xr-xgit-send-email.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index e05455f74c..1b99f40390 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, $_);