Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-05-12 19:44:03 +0300
committerSean McGivern <sean@gitlab.com>2017-06-02 21:37:09 +0300
commit1d3c33b57eeb39df76e78fd37c86532c02aa22ac (patch)
tree8c2a51cbf1fb6153192491c9d96e70d931c48041 /lib/feature.rb
parentf07aee72bef4604312e11a43fce3a47865bce100 (diff)
Increase diff limits to 100 KB for collapse and 200 KB overall
This is controlled with the feature flag gitlab_git_diff_size_limit_increase. Both of these limits were basically picked arbitrarily in the first place; disabling the feature flag reverts to the old limits.
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index 2e2b343f82c..5650a1c1334 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -27,6 +27,18 @@ class Feature
all.map(&:name).include?(feature.name)
end
+ def enabled?(key)
+ get(key).enabled?
+ end
+
+ def enable(key)
+ get(key).enable
+ end
+
+ def disable(key)
+ get(key).disable
+ end
+
private
def flipper