[nagiosplug] git-notify: Fix "global" notifications
Holger Weiss
hweiss at users.sourceforge.net
Sat Nov 7 10:42:00 CET 2009
Module: nagiosplug
Branch: master
Commit: 73141bfd92b8baec4dfd45bb99275b53512ec2b9
Author: Holger Weiss <holger at zedat.fu-berlin.de>
Date: Sat Nov 7 10:40:00 2009 +0100
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=73141bf
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.
---
tools/git-notify | 5 ++++-
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(@)
while (<REVLIST>)
{
chomp;
- die "Invalid commit: $_" if not /^[0-9a-f]{40}$/;
+ unless (grep {$_ eq "--pretty"} @args)
+ {
+ die "Invalid commit: $_" if not /^[0-9a-f]{40}$/;
+ }
push @$revlist, $_;
}
close REVLIST or die $! ? "Cannot execute rev-list: $!" : "rev-list exited with status: $?";
More information about the Commits
mailing list