diff options
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/git-notify | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libexec/git-notify b/libexec/git-notify index 64da7c0..228c7d6 100755 --- a/libexec/git-notify +++ b/libexec/git-notify | |||
@@ -4,6 +4,7 @@ | |||
4 | # | 4 | # |
5 | # Copyright 2005 Alexandre Julliard | 5 | # Copyright 2005 Alexandre Julliard |
6 | # Copyright 2009, 2013 Nagios Plugins Development Team | 6 | # Copyright 2009, 2013 Nagios Plugins Development Team |
7 | # Copyright 2024, 2025 Monitoring Plugins Development Team | ||
7 | # | 8 | # |
8 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
@@ -34,9 +35,12 @@ | |||
34 | # | 35 | # |
35 | 36 | ||
36 | use strict; | 37 | use strict; |
37 | use Fcntl ':flock'; | 38 | use utf8; |
38 | use Encode qw(encode decode); | 39 | use feature qw(evalbytes unicode_eval unicode_strings); |
40 | use open qw(:std :utf8); | ||
39 | use Cwd 'realpath'; | 41 | use Cwd 'realpath'; |
42 | use Encode qw(encode); | ||
43 | use Fcntl ':flock'; | ||
40 | 44 | ||
41 | sub git_config($); | 45 | sub git_config($); |
42 | sub get_repos_name(); | 46 | sub get_repos_name(); |
@@ -449,7 +453,7 @@ sub send_commit_notice($$) | |||
449 | my ($ref,$obj) = @_; | 453 | my ($ref,$obj) = @_; |
450 | my %info = get_object_info($obj); | 454 | my %info = get_object_info($obj); |
451 | my @notice = (); | 455 | my @notice = (); |
452 | my ($url,$subject,$obj_string); | 456 | my ($url,$from,$subject,$obj_string); |
453 | 457 | ||
454 | if ($gitweb_url) | 458 | if ($gitweb_url) |
455 | { | 459 | { |
@@ -515,9 +519,8 @@ sub send_commit_notice($$) | |||
515 | } | 519 | } |
516 | 520 | ||
517 | $subject .= truncate_str(${$info{"log"}}[0],50); | 521 | $subject .= truncate_str(${$info{"log"}}[0],50); |
518 | $_ = decode($info{"encoding"}, $_) for @notice; | 522 | $from = encode("MIME-Q",$info{'committer_name'}) . " <$from_address>"; |
519 | mail_notification("$info{'committer_name'} <$from_address>", $commitlist_address, $subject, | 523 | mail_notification($from, $commitlist_address, $subject, "text/plain; charset=UTF-8", @notice); |
520 | "text/plain; charset=UTF-8", @notice); | ||
521 | } | 524 | } |
522 | 525 | ||
523 | # send a commit notice to the CIA server | 526 | # send a commit notice to the CIA server |