From 465e5de5107da7e280902de581ee29c6f0cd1abc Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 7 Jun 2017 22:24:11 +0900 Subject: [PATCH] Fix condition --- lib/ci/gitlab_ci_yaml_processor.rb | 8 +++++--- lib/gitlab/gitaly_client.rb | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 738ff474596..bd3ce40ca4b 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -208,12 +208,14 @@ module Ci def matching?(patterns, ref, tag, source) patterns.any? do |pattern| pattern, path = pattern.split('@', 2) - unmatches_path?(path) && matches_pattern?(pattern, ref, tag, source) + matches_path?(path) && matches_pattern?(pattern, ref, tag, source) end end - def unmatches_path?(path) - path && path != self.path + def matches_path?(path) + return true unless path + + path == self.path end def matches_pattern?(pattern, ref, tag, source) diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb index 2343446bf22..598f642415a 100644 --- a/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb @@ -49,7 +49,8 @@ module Gitlab end def self.enabled? - Gitlab.config.gitaly.enabled + # Gitlab.config.gitaly.enabled + false end def self.feature_enabled?(feature, status: MigrationStatus::OPT_IN)