Commit:    c1cce169b8836c0b4b4c1d43fde38840e8dfb7df
Author:    David Soria Parra <>         Thu, 22 Mar 2012 07:55:38 
Parents:   b9eaafaca29082302885facb1006d8241730d9a4
Branches:  dsp/playground


Check for empty outputs, not for return values

gitExec doesnt return the return value but the output. Therefore
check if the output in isRevInBranches is empty. This indicates
that it is not.

Changed paths:
  M  lib/Git/PostReceiveHook.php

diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index e9d9d74..f427a76 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -453,7 +453,8 @@ class PostReceiveHook extends ReceiveHook
      * @return bool
     private function isRevExistsInBranches($revision, array $branches) {
-        return !(bool) \Git::gitExec('rev-list --max-count=1 %s --not %s', 
escapeshellarg($revision), implode(' ', 
+        $output = \Git::gitExec('rev-list --max-count=1 %s --not %s', 
escapeshellarg($revision), implode(' ', 
+        return !empty($output);
     private function getBranchesForRevision($revision) {

PHP CVS Mailing List (
To unsubscribe, visit:

Reply via email to