send-email: automatic envelope sender
This adds the option to specify the envelope sender as "auto" which would pick the 'from' address. This is good because now we can specify the address only in one place in $HOME/.gitconfig and change it easily. [jc: added tests] Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
4f333bc1d3
commit
c89e324145
@ -861,7 +861,9 @@ X-Mailer: git-send-email $gitversion
|
||||
|
||||
my @sendmail_parameters = ('-i', @recipients);
|
||||
my $raw_from = $sanitized_sender;
|
||||
$raw_from = $envelope_sender if (defined $envelope_sender);
|
||||
if (defined $envelope_sender && $envelope_sender ne "auto") {
|
||||
$raw_from = $envelope_sender;
|
||||
}
|
||||
$raw_from = extract_valid_address($raw_from);
|
||||
unshift (@sendmail_parameters,
|
||||
'-f', $raw_from) if(defined $envelope_sender);
|
||||
|
Reference in New Issue
Block a user