
module.exports = CommitSummary;

function CommitSummary () {
   this.branch = '';
   this.commit = '';
   this.summary = {
      changes: 0,
      insertions: 0,
      deletions: 0
   };
}

CommitSummary.prototype.setBranchFromCommit = function (commitData) {
   if (commitData) {
      this.branch = commitData[1];
      this.commit = commitData[2];
   }
};

CommitSummary.prototype.setSummaryFromCommit = function (commitData) {
   if (this.branch && commitData) {
      this.summary.changes = commitData[1] || 0;
      this.summary.insertions = commitData[2] || 0;
      this.summary.deletions = commitData[3] || 0;
   }
};

CommitSummary.parse = function (commit) {
   var lines = commit.trim().split('\n');

   var commitSummary = new CommitSummary();
   commitSummary.setBranchFromCommit(/\[([^\s]+) ([^\]]+)/.exec(lines.shift()));
   commitSummary.setSummaryFromCommit(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)?(?:,\s*(\d+))?/g.exec(lines.shift()));

   return commitSummary;
};

@@ -706,17 +706,57 @@
 ('%5Cn');%0A
+   var i = 0;%0A   var len = lines.length;
 %0A
-
    var c
@@ -791,16 +791,56 @@
 mary();%0A
+   for(;i%3Clen;i++)%7B%0A    if(i === 0)%7B%0A   
    commi
@@ -900,28 +900,108 @@
 ec(lines
-.shift()));%0A
+%5Bi%5D));%0A    %7D%0A    var re = /%5E %5Cd+%5Cs%5CS%7B1,%7D/; // 3 files changed%0A    if(re.test(lines%5Bi%5D))%7B%0A   
    commi
@@ -1091,20 +1091,38 @@
 ines
-.shift()));%0A
+%5Bi%5D));%0A      break;%0A    %7D%0A   %7D
 %0A   

Update CommitSummary.js