Commits

Anonymous committed fe7e372 Merge

Merge branch 'mg/maint-send-email-lazy-editor' into maint

* mg/maint-send-email-lazy-editor:
send-email: lazily assign editor variable

  • Participants
  • Parent commits 2e5a40f, 0ce142c

Comments (0)

Files changed (1)

File git-send-email.perl

 
 # 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, $_);