lib/gitlab_git/attributes.rb in gitlab_git-10.6.5 vs lib/gitlab_git/attributes.rb in gitlab_git-10.6.6
- old
+ new
@@ -114,10 +114,12 @@
each_line do |line|
next if line.start_with?(comment) || line.empty?
pattern, attrs = line.split(/\s+/, 2)
- pairs << [File.join(@path, pattern), parse_attributes(attrs)]
+ parsed = attrs ? parse_attributes(attrs) : {}
+
+ pairs << [File.join(@path, pattern), parsed]
end
# Newer entries take precedence over older entries.
pairs.reverse.to_h
end