diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-04-03 12:28:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-04-03 12:28:42 -0700 |
commit | aa8b12505b4b8365ba96236a0e7698959063765e (patch) | |
tree | a8451a5ce85b826854efe162839c6dd639909d62 /git-send-email.perl | |
parent | 4de113cdf55631ef1f8bf34658fb647509520e8a (diff) | |
parent | 0ce142c944181236f99ea3f7fc72712f3e43d2e2 (diff) | |
download | git-aa8b12505b4b8365ba96236a0e7698959063765e.tar.gz |
Merge branch 'mg/maint-send-email-lazy-editor'
* mg/maint-send-email-lazy-editor:
send-email: lazily assign editor variable
Diffstat (limited to 'git-send-email.perl')
-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 33bcfb4e76..ce569a9c8f 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -166,9 +166,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, $_); |