summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2018-01-23 18:42:10 +0100
committerJacob Vosmaer <jacob@gitlab.com>2018-01-25 14:05:11 +0100
commit6d6f7536bd9b5bcbf94dfbe15cc86e84d06527f5 (patch)
tree6b6c62e084b1ce914da742be847d56086b0b6475 /config
parent1f5af51b476a36a72759e7560c125c2b9602b145 (diff)
downloadgitlab-ce-6d6f7536bd9b5bcbf94dfbe15cc86e84d06527f5.tar.gz
Look for rugged with static analysislint-rugged
Diffstat (limited to 'config')
-rw-r--r--config/initializers/rugged_use_gitlab_git_attributes.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/config/initializers/rugged_use_gitlab_git_attributes.rb b/config/initializers/rugged_use_gitlab_git_attributes.rb
deleted file mode 100644
index c0d45caec42..00000000000
--- a/config/initializers/rugged_use_gitlab_git_attributes.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# We don't want to ever call Rugged::Repository#fetch_attributes, because it has
-# a lot of I/O overhead:
-# <https://gitlab.com/gitlab-org/gitlab_git/commit/340e111e040ae847b614d35b4d3173ec48329015>
-#
-# While we don't do this from within the GitLab source itself, the Linguist gem
-# has a dependency on Rugged and uses the gitattributes file when calculating
-# repository-wide language statistics:
-# <https://github.com/github/linguist/blob/v4.7.0/lib/linguist/lazy_blob.rb#L33-L36>
-#
-# The options passed by Linguist are those assumed by Gitlab::Git::InfoAttributes
-# anyway, and there is no great efficiency gain from just fetching the listed
-# attributes with our implementation, so we ignore the additional arguments.
-#
-module Rugged
- class Repository
- module UseGitlabGitAttributes
- def fetch_attributes(name, *)
- attributes.attributes(name)
- end
-
- def attributes
- @attributes ||= Gitlab::Git::InfoAttributes.new(path)
- end
- end
-
- prepend UseGitlabGitAttributes
- end
-end