diff options
author | Sean McGivern <sean@gitlab.com> | 2019-03-04 12:22:44 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-03-04 12:22:44 +0300 |
commit | fd50ba4240469615458d5554e24613b432b6c6c0 (patch) | |
tree | e94346e0c16b5dea928653f54dc5288689886393 /lib/tasks/gitlab | |
parent | d4a2cd793992f96a24170a4d356f7849cf10e9cb (diff) | |
parent | fb6a4e21d4a5142e72ac5864fae29192cfc59d64 (diff) |
Merge branch 'sh-rugged-find-commit' into 'master'
Bring back Rugged implementation of find_commit
See merge request gitlab-org/gitlab-ce!25477
Diffstat (limited to 'lib/tasks/gitlab')
-rw-r--r-- | lib/tasks/gitlab/features.rake | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/features.rake b/lib/tasks/gitlab/features.rake new file mode 100644 index 00000000000..d115961108e --- /dev/null +++ b/lib/tasks/gitlab/features.rake @@ -0,0 +1,24 @@ +namespace :gitlab do + namespace :features do + desc 'GitLab | Features | Enable direct Git access via Rugged for NFS' + task enable_rugged: :environment do + set_rugged_feature_flags(true) + puts 'All Rugged feature flags were enabled.' + end + + task disable_rugged: :environment do + set_rugged_feature_flags(false) + puts 'All Rugged feature flags were disabled.' + end + end + + def set_rugged_feature_flags(status) + Gitlab::Git::RuggedImpl::Repository::FEATURE_FLAGS.each do |flag| + if status + Feature.enable(flag) + else + Feature.disable(flag) + end + end + end +end |