Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'mg/maint-send-email-lazy-editor'
author
Junio C Hamano
<gitster@pobox.com>
Sat, 3 Apr 2010 19:28:42 +0000
(12:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 3 Apr 2010 19:28:42 +0000
(12:28 -0700)
* mg/maint-send-email-lazy-editor:
send-email: lazily assign editor variable
git-send-email.perl
patch
|
blob
|
history
raw
(from parent 1:
4de113c
)
diff --git
a/git-send-email.perl
b/git-send-email.perl
index 33bcfb4e763f04f2d4fc12f4d9948d958c507d32..ce569a9c8f964b3cdc8920325bc817141035c2c3 100755
(executable)
--- a/
git-send-email.perl
+++ b/
git-send-email.perl
@@
-166,9
+166,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, $_);