send-email: minor code refactoring

Group expressions in a single if statement. This avoid checking
multiple time if the variable $sender is defined.

Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Remi Lespinet 2015-06-30 14:16:47 +02:00 committed by Junio C Hamano
parent 193d716011
commit c46e27aa77

View File

@ -774,9 +774,9 @@ if (!$force) {
}
}
($sender) = expand_aliases($sender) if defined $sender;
if (!defined $sender) {
if (defined $sender) {
($sender) = expand_aliases($sender);
} else {
$sender = $repoauthor || $repocommitter || '';
}