summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-02-13 19:50:00 -0600
committerNeil Moore <neil@s-z.org>2014-02-13 19:50:00 -0600
commit8f20368e9dfb2735d11a50f2e94e5c70c88e6f11 (patch)
treea1465c0fc5c354d718ee231dbe6e377017aad21e
parent123a2dea45234d5f00edf18db347c0abb7e716d8 (diff)
downloadcrawlbot-8f20368e9dfb2735d11a50f2e94e5c70c88e6f11.tar.gz
crawlbot-8f20368e9dfb2735d11a50f2e94e5c70c88e6f11.zip
Actually fix "and 1 more commits".
-rw-r--r--lib/Crawl/Bot/Plugin/Commit.pm7
1 files 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;
}