summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/repository.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 8a2e711ec4e..a6739f12280 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -683,17 +683,16 @@ module Gitlab
attributes(path)[name]
end
- # Check .gitattributes for a given ref
+ # Returns parsed .gitattributes for a given ref
#
- # This only checks the root .gitattributes file,
+ # This only parses the root .gitattributes file,
# it does not traverse subfolders to find additional .gitattributes files
#
# This method is around 30 times slower than `attributes`, which uses
# `$GIT_DIR/info/attributes`. Consider caching AttributesAtRefParser
# and reusing that for multiple calls instead of this method.
- def attributes_at(ref, file_path)
- parser = AttributesAtRefParser.new(self, ref)
- parser.attributes(file_path)
+ def attributes_at(ref)
+ AttributesAtRefParser.new(self, ref)
end
def languages(ref = nil)