From 6dd1eeafade7105c0785340a43877a8d63793892 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 20 Sep 2012 00:20:12 +0200 Subject: [PATCH 1/1] parse logs with commits that have no line changes --- src/phorkie/Repository.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/phorkie/Repository.php b/src/phorkie/Repository.php index 43f2b23..ed07fb5 100644 --- a/src/phorkie/Repository.php +++ b/src/phorkie/Repository.php @@ -310,6 +310,13 @@ class Repository $commit->committerName = $arOutput[$current + 2]; $commit->committerEmail = $arOutput[$current + 3]; + if (substr($arOutput[$current + 4], 0, 1) != ' ') { + //commit without changed lines + $arCommits[] = $commit; + $current += 4; + continue; + } + $arLineParts = explode(' ', trim($arOutput[$current + 4])); $commit->filesChanged = $arLineParts[0]; $commit->linesAdded = $arLineParts[3]; -- 2.30.2