git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not try to delete if file does not exist
[phorkie.git]
/
src
/
phorkie
/
Repository.php
diff --git
a/src/phorkie/Repository.php
b/src/phorkie/Repository.php
index 6ed380741ee4a2c0c2479887e8adec48ceac817d..0cc279b7472f0b66442a47d2ad77633c6f4394c6 100644
(file)
--- a/
src/phorkie/Repository.php
+++ b/
src/phorkie/Repository.php
@@
-104,6
+104,11
@@
class Repository
$this->hash = $output;
}
$this->hash = $output;
}
+ /**
+ * Populates $this->message
+ *
+ * @return void
+ */
public function loadMessage()
{
$rev = (isset($this->hash)) ? $this->hash : 'HEAD';
public function loadMessage()
{
$rev = (isset($this->hash)) ? $this->hash : 'HEAD';
@@
-118,7
+123,7
@@
class Repository
$this->message = trim($output);
} else {
$this->message = "This commit message intentionally left blank.";
$this->message = trim($output);
} else {
$this->message = "This commit message intentionally left blank.";
-
}
+ }
}
public function loadById($id)
}
public function loadById($id)
@@
-233,14
+238,14
@@
class Repository
/**
* Get a link to the 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
*/
*
* @return string
*/
@@
-252,6
+257,8
@@
class Repository
return '/' . $this->id;
} else if ($type == 'fork') {
return '/' . $this->id . '/fork';
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') {
} else if ($type == 'delete') {
return '/' . $this->id . '/delete';
} else if ($type == 'delete-confirm') {
@@
-303,6
+310,13
@@
class Repository
$commit->committerName = $arOutput[$current + 2];
$commit->committerEmail = $arOutput[$current + 3];
$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];
$arLineParts = explode(' ', trim($arOutput[$current + 4]));
$commit->filesChanged = $arLineParts[0];
$commit->linesAdded = $arLineParts[3];