send-email: allow use of aliases in the From field of --compose mode

Aliases were expanded before considering the From field of the
--compose option. This is inconsistent with other fields
(To, Cc, ...) which already support aliases.

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:46 +02:00 коммит произвёл Junio C Hamano
Родитель b5e112d8d2
Коммит 193d716011
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -530,8 +530,6 @@ if (@alias_files and $aliasfiletype and defined $parse_alias{$aliasfiletype}) {
} }
} }
($sender) = expand_aliases($sender) if defined $sender;
# is_format_patch_arg($f) returns 0 if $f names a patch, or 1 if # is_format_patch_arg($f) returns 0 if $f names a patch, or 1 if
# $f is a revision list specification to be passed to format-patch. # $f is a revision list specification to be passed to format-patch.
sub is_format_patch_arg { sub is_format_patch_arg {
@ -776,6 +774,8 @@ if (!$force) {
} }
} }
($sender) = expand_aliases($sender) if defined $sender;
if (!defined $sender) { if (!defined $sender) {
$sender = $repoauthor || $repocommitter || ''; $sender = $repoauthor || $repocommitter || '';
} }