$this->hash = $output;
}
+ /**
+ * Populates $this->message
+ *
+ * @return void
+ */
public function loadMessage()
{
$rev = (isset($this->hash)) ? $this->hash : 'HEAD';
$this->message = trim($output);
} else {
$this->message = "This commit message intentionally left blank.";
- }
+ }
}
public function loadById($id)
/**
* 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
*/
return '/' . $this->id;
} else if ($type == 'fork') {
return '/' . $this->id . '/fork';
+ } else if ($type == 'doap') {
+ return '/' . $this->id . '/doap';
} else if ($type == 'delete') {
return '/' . $this->id . '/delete';
} else if ($type == 'delete-confirm') {
$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];