From e875ac69b4cc59852412bf09b36f5f272f8acc21 Mon Sep 17 00:00:00 2001 From: Neil Moore Date: Mon, 14 Jul 2014 12:44:31 -0500 Subject: Commit: handle zero insertions/etc as well. --- lib/Crawl/Bot/Plugin/Commit.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3