Method: Gitlab::Git::Attributes#attributes
- Defined in:
- lib/gitlab_git/attributes.rb
#attributes(path) ⇒ Object
Returns all the Git attributes for the given path.
path - A path to a file for which to get the attributes.
Returns a Hash.
30 31 32 33 34 35 36 37 38 |
# File 'lib/gitlab_git/attributes.rb', line 30 def attributes(path) full_path = File.join(@path, path) patterns.each do |pattern, attrs| return attrs if File.fnmatch?(pattern, full_path) end {} end |