summaryrefslogtreecommitdiffstats
path: root/tools/git-notify
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2009-11-07 09:40:00 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2009-11-07 09:40:00 (GMT)
commit73141bfd92b8baec4dfd45bb99275b53512ec2b9 (patch)
tree7923763bca3936a03c1124420c262439e7653fbf /tools/git-notify
parentd100429a4816da68f65c2a5be291e7ae7beb5e17 (diff)
downloadmonitoring-plugins-73141bfd92b8baec4dfd45bb99275b53512ec2b9.tar.gz
git-notify: Fix "global" notifications
If the number of commits included with a single push exceeds the maximum specified via "-n", a single notification will be generated instead of individual e-mails. For listing the commits within such a notification, git-rev-list(1)'s "--pretty" option is used. This yields output which the git_rev_list() subroutine didn't accept. That's now fixed.
Diffstat (limited to 'tools/git-notify')
-rwxr-xr-xtools/git-notify5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/git-notify b/tools/git-notify
index 8ade7b8..e64754c 100755
--- a/tools/git-notify
+++ b/tools/git-notify
@@ -145,7 +145,10 @@ sub git_rev_list(@)
145 while (<REVLIST>) 145 while (<REVLIST>)
146 { 146 {
147 chomp; 147 chomp;
148 die "Invalid commit: $_" if not /^[0-9a-f]{40}$/; 148 unless (grep {$_ eq "--pretty"} @args)
149 {
150 die "Invalid commit: $_" if not /^[0-9a-f]{40}$/;
151 }
149 push @$revlist, $_; 152 push @$revlist, $_;
150 } 153 }
151 close REVLIST or die $! ? "Cannot execute rev-list: $!" : "rev-list exited with status: $?"; 154 close REVLIST or die $! ? "Cannot execute rev-list: $!" : "rev-list exited with status: $?";