com karma: fix double bugs: lib/Git/BugsWebPostReceiveHook.php
| From: | Alexander Moskaliov | Date: | Sat, 07 Apr 2012 10:45:22 +0000 |
| Subject: | com karma: fix double bugs: lib/Git/BugsWebPostReceiveHook.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68687@lists.php.net to get a copy of this message | ||
Commit: bc220ca91ec470baab210cb652c22f10abc689c6
Author: Alexander Moskaliov <irker@php.net> Sat, 7 Apr 2012 14:45:22 +0400
Parents: 61cc09b1cbe8e3dcec3cf6b0447d942755c85a7c
Branches: master
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=bc220ca91ec470baab210cb652c22f10abc689c6
Log:
fix double bugs
Changed paths:
M lib/Git/BugsWebPostReceiveHook.php
Diff:
diff --git a/lib/Git/BugsWebPostReceiveHook.php b/lib/Git/BugsWebPostReceiveHook.php
index fa4ebb7..b608b88 100644
--- a/lib/Git/BugsWebPostReceiveHook.php
+++ b/lib/Git/BugsWebPostReceiveHook.php
@@ -41,17 +41,15 @@ class BugsWebPostReceiveHook extends ReceiveHook
\Git::GIT_EXECUTABLE,
$repourl
);
- exec($cmd, $output);
+ exec($cmd, $heads);
- /* do we have heads? otherwise it's a new repo! */
- $heads = implode(' ', $output);
- $not = count($output) > 0 ? sprintf('--not %s', escapeshellarg($heads))
: '';
+ $not = count($heads) > 0 ? ' --not ' . implode(' ',
$this->escapeArrayShellArgs($heads)) : '';
$cmd = sprintf(
'%s --git-dir=%s log --pretty=format:"[%%ae] %%H %%s" %s %s',
\Git::GIT_EXECUTABLE,
$repourl,
- $not,
- escapeshellarg($new)
+ escapeshellarg($new),
+ $not
);
exec($cmd, $output);
} elseif ($new != \Git::NULLREV) {