diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-04-09 22:23:04 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-09 22:23:04 -0700 |
commit | fe7e37235dd9b36402afeccb24bbced933e847d7 (patch) | |
tree | f49815418e36e60b5d6b54fd04157b1598cd6b0d | |
parent | 2e5a40f0b59af243f83a14bf1db4b7f833c6c49d (diff) | |
parent | 0ce142c944181236f99ea3f7fc72712f3e43d2e2 (diff) | |
download | git-fe7e37235dd9b36402afeccb24bbced933e847d7.tar.gz |
Merge branch 'mg/maint-send-email-lazy-editor' into maint
* mg/maint-send-email-lazy-editor:
send-email: lazily assign editor variable
-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 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, $_); |