com karma: Check only unpushed branches: lib/Git/PostReceiveHook.php
| From: | David Soria Parra | Date: | Wed, 21 Mar 2012 18:53:11 +0000 |
| Subject: | com karma: Check only unpushed branches: lib/Git/PostReceiveHook.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68125@lists.php.net to get a copy of this message | ||
Commit: 482891ec472c2946c6f51140d3be016d94cbb80c
Author: David Soria Parra <dsp@php.net> Wed, 21 Mar 2012 19:53:11 +0100
Parents: c07c79adcbb07fe0ce6a545b6033947a892b5605
Branches: dsp/playground
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=482891ec472c2946c6f51140d3be016d94cbb80c
Log:
Check only unpushed branches
Changed paths:
M lib/Git/PostReceiveHook.php
Diff:
482891ec472c2946c6f51140d3be016d94cbb80c
diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index 44e4144..26da8c6 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -93,8 +93,9 @@ class PostReceiveHook extends ReceiveHook
}
}
+ $unpushedBranches = array_diff($this->allBranches, $thi->updatedBranches);
foreach (array_unique($revisions) as $revision) {
- if (!$this->isRevExistsInBranches($revision, $this->allBranches)) {
+ if (!$this->isRevExistsInBranches($revision, $unpushedBranches)) {
$this->sendCommitMail($revision);
}
}