com karma: fix bug with new branch: lib/Git/BugsWebPostReceiveHook.php
| From: | Alexander Moskaliov | Date: | Sat, 07 Apr 2012 10:45:22 +0000 |
| Subject: | com karma: fix bug with new branch: lib/Git/BugsWebPostReceiveHook.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68683@lists.php.net to get a copy of this message | ||
Commit: 661f83009aec570fffc1384bcffafbef25451818
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=661f83009aec570fffc1384bcffafbef25451818
Log:
fix bug with new branch
Changed paths:
M lib/Git/BugsWebPostReceiveHook.php
Diff:
diff --git a/lib/Git/BugsWebPostReceiveHook.php b/lib/Git/BugsWebPostReceiveHook.php
index fa4ebb7..8331ea7 100644
--- a/lib/Git/BugsWebPostReceiveHook.php
+++ b/lib/Git/BugsWebPostReceiveHook.php
@@ -45,13 +45,13 @@ class BugsWebPostReceiveHook extends ReceiveHook
/* do we have heads? otherwise it's a new repo! */
$heads = implode(' ', $output);
- $not = count($output) > 0 ? sprintf('--not %s', escapeshellarg($heads))
: '';
+ $not = count($output) > 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) {