do not try to delete if file does not exist
[phorkie.git] / src / phorkie / Repository.php
index 43f2b23dddf0be98f7ac56626cd1cc506be35541..0cc279b7472f0b66442a47d2ad77633c6f4394c6 100644 (file)
@@ -104,7 +104,7 @@ class Repository
         $this->hash = $output;
     }
 
-       /**
+    /**
      * Populates $this->message
      *
      * @return void
@@ -238,14 +238,14 @@ class Repository
     /**
      * Get a link to the repository
      *
-     * @param string $type Link type. Supported are:
-     *                     - "edit"
-     *                     - "delete"
-     *                     - "delete-confirm"
-     *                     - "display"
-     *                     - "fork"
-     *                     - "revision"
-     * @param string $option
+     * @param string $type   Link type. Supported are:
+     *                       - "edit"
+     *                       - "delete"
+     *                       - "delete-confirm"
+     *                       - "display"
+     *                       - "fork"
+     *                       - "revision"
+     * @param string $option Additional link option, e.g. revision number
      *
      * @return string
      */
@@ -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];