Merge branch 'ab/perl-do-not-abuse-map'

Perl critique.

* ab/perl-do-not-abuse-map:
  git-send-email: replace "map" in void context with "for"
This commit is contained in:
Junio C Hamano
2021-04-13 15:28:50 -07:00

View File

@ -217,12 +217,12 @@ sub do_edit {
$editor = Git::command_oneline('var', 'GIT_EDITOR'); $editor = Git::command_oneline('var', 'GIT_EDITOR');
} }
if (defined($multiedit) && !$multiedit) { if (defined($multiedit) && !$multiedit) {
map { for (@_) {
system('sh', '-c', $editor.' "$@"', $editor, $_); system('sh', '-c', $editor.' "$@"', $editor, $_);
if (($? & 127) || ($? >> 8)) { if (($? & 127) || ($? >> 8)) {
die(__("the editor exited uncleanly, aborting everything")); die(__("the editor exited uncleanly, aborting everything"));
} }
} @_; }
} else { } else {
system('sh', '-c', $editor.' "$@"', $editor, @_); system('sh', '-c', $editor.' "$@"', $editor, @_);
if (($? & 127) || ($? >> 8)) { if (($? & 127) || ($? >> 8)) {