lib/gitlab_git/attributes.rb in gitlab_git-10.6.0 vs lib/gitlab_git/attributes.rb in gitlab_git-10.6.1
- old
+ new
@@ -84,9 +84,11 @@
# Iterates over every line in the attributes file.
def each_line
full_path = File.join(@path, 'info/attributes')
+ return unless File.exist?(full_path)
+
File.open(full_path, 'r') do |handle|
handle.each_line do |line|
yield line.strip
end
end