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>

Remi Lespinet committed Jun 30, 2015 at 14:16 UTC 193d7160111ebf5b898f53240c33c1e4101d9598
1 file changed +2 -2
git-send-email.perl
+2 -2
@@ -530,8 +530,6 @@ if (@alias_files and $aliasfiletype and defined $parse_alias{$aliasfiletype}) {
530 }
531 }
532
533 -($sender) = expand_aliases($sender) if defined $sender;
534 -
533 # is_format_patch_arg($f) returns 0 if $f names a patch, or 1 if
534 # $f is a revision list specification to be passed to format-patch.
535 sub is_format_patch_arg {
@@ -776,6 +774,8 @@ if (!$force) {
774 }
775 }
776
777 +($sender) = expand_aliases($sender) if defined $sender;
778 +
779 if (!defined $sender) {
780 $sender = $repoauthor || $repocommitter || '';
781 }