com karma: Do not include delete revisions: lib/Git/PostReceiveHook.php
| From: | David Soria Parra | Date: | Wed, 21 Mar 2012 18:31:43 +0000 |
| Subject: | com karma: Do not include delete revisions: lib/Git/PostReceiveHook.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68128@lists.php.net to get a copy of this message | ||
Commit: 1f3087ca7e2bcdad1695b789797ff43079cee36f
Author: David Soria Parra <dsp@php.net> Wed, 21 Mar 2012 19:31:43 +0100
Parents: a6bcc1358deb70b85644ed594db3cbd8f5d65a35
Branches: dsp/playground
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=1f3087ca7e2bcdad1695b789797ff43079cee36f
Log:
Do not include delete revisions
Changed paths:
M lib/Git/PostReceiveHook.php
Diff:
1f3087ca7e2bcdad1695b789797ff43079cee36f
diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index 1e18195..bebe0ee 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -86,10 +86,11 @@ class PostReceiveHook extends ReceiveHook
if ($ref['reftype'] == self::REF_TAG) {
$this->sendTagMail($ref['refname'], $ref['changetype'],
$ref['old'], $ref['new']);
}
-
- $revisions = array_merge(
- $revisions,
- $this->getRevisions(escapeshellarg($ref['old'] . '..' .
$ref['new'])));
+ if ($ref['retype'] != self::TYPE_DELETED) {
+ $revisions = array_merge(
+ $revisions,
+ $this->getRevisions(escapeshellarg($ref['old'] . '..' .
$ref['new'])));
+ }
}
foreach (array_unique($revisions) as $revision) {