summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-07-14 12:44:31 -0500
committerNeil Moore <neil@s-z.org>2014-07-14 12:44:31 -0500
commite875ac69b4cc59852412bf09b36f5f272f8acc21 (patch)
tree67ff15542cf47b90bd35f51c6ea7fa6d45020926
parent0fa25d80abf150a87968dce389d10027f1729e27 (diff)
downloadcrawlbot-e875ac69b4cc59852412bf09b36f5f272f8acc21.tar.gz
crawlbot-e875ac69b4cc59852412bf09b36f5f272f8acc21.zip
Commit: handle zero insertions/etc as well.
-rw-r--r--lib/Crawl/Bot/Plugin/Commit.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Crawl/Bot/Plugin/Commit.pm b/lib/Crawl/Bot/Plugin/Commit.pm
index c43b661..9344dde 100644
--- a/lib/Crawl/Bot/Plugin/Commit.pm
+++ b/lib/Crawl/Bot/Plugin/Commit.pm
@@ -298,7 +298,7 @@ sub parse_commit {
$info =~ /(.*?)\x00(.*?)\x00(.*?)\x00(.*?)\x00(.*?)\x00(.*?)\x00(.*)/s or return undef;
my ($hash, $author, $committer, $subject, $body, $date, $stat) = ($1, $2, $3, $4, $5, $6, $7);
- my ($nfiles, $nins, $ndel);
+ my ($nfiles, $nins, $ndel) = (0, 0, 0);
($stat =~ /(\d+) files? changed/) and $nfiles = $1;
($stat =~ /(\d+) insertions?/) and $nins = $1;
($stat =~ /(\d+) deletions?/) and $ndel = $1;