diff --git a/tools/git-notify b/tools/git-notify
index dc843efd88d8ccacec5edc53e6eb6d77f5c1c294..b3223a87a384f85b92d913e775b786e543da0267 100755 (executable)
--- a/tools/git-notify
+++ b/tools/git-notify
# -A Omit the author name from the mail subject
# -C Show committer in the body if different from the author
# -c name Send CIA notifications under specified project name
+# -H The mail(1) utility doesn't accept headers via "-a"
# -m addr Send mail notifications to specified address
# -n max Set max number of individual mails to send
# -r name Set the git repository name
# configuration parameters
+# the $mailer doesn't accept headers via "-a" (can be set with the -H option)
+my $legacy_mail = git_config( "notify.legacymail" );
+
# omit the author from the mail subject (can be set with the -A option)
my $omit_author = git_config( "notify.omitauthor" );
print " -A Omit the author name from the mail subject\n";
print " -C Show committer in the body if different from the author\n";
print " -c name Send CIA notifications under specified project name\n";
+ print " -H The mail(1) utility doesn't accept headers via `-a'\n";
print " -m addr Send mail notifications to specified address\n";
print " -n max Set max number of individual mails to send\n";
print " -r name Set the git repository name\n";
elsif ($arg eq '-A') { $omit_author = 1; }
elsif ($arg eq '-C') { $show_committer = 1; }
elsif ($arg eq '-c') { $cia_project_name = shift @ARGV; }
+ elsif ($arg eq '-H') { $legacy_mail = 1; }
elsif ($arg eq '-m') { $commitlist_address = shift @ARGV; }
elsif ($arg eq '-n') { $max_individual_notices = shift @ARGV; }
elsif ($arg eq '-r') { $repos_name = shift @ARGV; }
return unless defined $pid;
if (!$pid)
{
- exec $mailer, "-s", $subject, "-a", "Content-Type: $content_type", $name or die "Cannot exec $mailer";
+ my @mailer_options = ( "-s", $subject );
+
+ unless ($legacy_mail)
+ {
+ push @mailer_options, "-a", "Content-Type: $content_type";
+ }
+ exec $mailer, @mailer_options, $name or die "Cannot exec $mailer";
}
binmode MAIL, ":utf8";
print MAIL join("\n", @text), "\n";
{
push @notice, format_table(
"Module: $repos_name",
- "Branch: $ref",
- "Tag: $obj",
+ "Tag: $ref",
+ "SHA1: $obj",
"Tagger:" . $info{"tagger"},
"Date:" . format_date($info{"tagger_date"},$info{"tagger_tz"}),
$url ? "URL: $url" : undef),