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 | |
parent | Merge branch 'rb/maint-python-path' (diff) | |
parent | send-email: lazily assign editor variable (diff) | |
download | tgif-aa8b12505b4b8365ba96236a0e7698959063765e.tar.xz |
Merge branch 'mg/maint-send-email-lazy-editor'
* 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 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, $_); |