From 8f20368e9dfb2735d11a50f2e94e5c70c88e6f11 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Thu, 13 Feb 2014 19:50:00 -0600 Subject: Actually fix "and 1 more commits". --- lib/Crawl/Bot/Plugin/Commit.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Crawl/Bot/Plugin/Commit.pm b/lib/Crawl/Bot/Plugin/Commit.pm index 1901116..ccb13ae 100644 --- a/lib/Crawl/Bot/Plugin/Commit.pm +++ b/lib/Crawl/Bot/Plugin/Commit.pm @@ -222,9 +222,10 @@ sub tick { my $count = 0; for my $rev (reverse @revs) { - # If it's just one more than the announce limit, don't bother with - # the message and announce the last commit anyway. - if (++$count > $self->announce_limit and scalar @revs > 1) { + # If it's just one more than the announce limit, don't + # bother with the message and announce the last commit + # anyway. + if (++$count > $self->announce_limit and scalar @revs > $count) { $say->("... and " . (scalar @revs - $count + 1) . " more commits"); last; } -- cgit v1.2.3