Re: [git] karma.git branch master updated. 002a63c
| From: | Hannes Magnusson | Date: | Tue, 06 Mar 2012 07:21:07 +0000 |
| Subject: | Re: [git] karma.git branch master updated. 002a63c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-67844@lists.php.net to get a copy of this message | ||
On Sat, Mar 3, 2012 at 22:21, <dsp@php.net> wrote:
> The branch, master on karma.git has been updated
> via 002a63c12dc1eadb3885d9fc5c6b97cf3863913a (commit)
> via f3d11575dc77ab1cc7eda290a4366122b923b1c1 (commit)
> via 51ca66d43a28b1c50cfd4e994712bc577e440e52 (commit)
> via c358027fd70d57b60f12b620dc78f6fe7c384aec (commit)
> from 8d595325d65b7de86651483a1705a0ee2a4b4bd5 (commit)
>
>
> http://git.php.net/?p=karma.git;a=log;h=002a63c12dc1eadb3885d9fc5c6b97cf3863913a;hp=8d595325d65b7de86651483a1705a0ee2a4b4bd5
>
> Summary of changes:
> hooks/pre-receive | 29 +++++++++-----
> lib/Git.php | 25 ++++++++++++
> lib/Git/PushInformation.php | 86 +++++++++++++++++++++++++++++++++++++++++++
> lib/Git/ReceiveHook.php | 43 +++++++++------------
> 4 files changed, 148 insertions(+), 35 deletions(-)
> create mode 100644 lib/Git.php
> create mode 100644 lib/Git/PushInformation.php
>
> -- Log ----------------------------------------
> commit 002a63c12dc1eadb3885d9fc5c6b97cf3863913a
> Author: David Soria Parra <dsp@php.net>
> Date: Fri Mar 2 03:06:30 2012 +0100
>
> Require access to all the repository in case we do a forced push
>
> A forced push can happen when you delete a tag or rewrite commits. We allow
> this, but only if you have access to the root of the repository.
>
> diff --git a/hooks/pre-receive b/hooks/pre-receive
> index 46195a4..48da31b 100755
> --- a/hooks/pre-receive
> +++ b/hooks/pre-receive
> @@ -11,11 +11,15 @@ namespace Karma;
>
> const KARMA_FILE = '/git/checkout/SVNROOT/global_avail';
> const REPOSITORY_PATH = '/git/repositories';
> +const LIB_PATH = '/git/checkout/karma/lib';
>
> -set_include_path('/git/checkout/karma/lib' .
> +set_include_path(
> + getenv('KARMA_LIB_PATH') ?: LIB_PATH .
> PATH_SEPARATOR .
> get_include_path());
>
> +include 'Git.php';
> +include 'Git/PushInformation.php';
> include 'Git/ReceiveHook.php';
>
> function deny($reason)
> @@ -107,16 +111,19 @@ if ($hook->isKarmaIgnored()) {
> accept("No karma check necessary. Thank you for your contribution.\n");
> }
>
> -$requested_paths = $hook->getReceivedPaths();
> +$repo_name = $hook->getRepositoryName();
> +$pi = new \Git\PushInformation($hook);
> +$req_paths = ($pi->isForced()) ? [''] : $hook->getReceivedPaths();
> +var_dump($pi->isForced());
Are you debugging this script, or is this just a typo?
-Hannes