lib/gitlab_git/repository.rb in gitlab_git-7.1.11 vs lib/gitlab_git/repository.rb in gitlab_git-7.1.12

- old
+ new

@@ -893,10 +893,12 @@ pathname.each_filename do |dir| if tmp_entry.nil? tmp_entry = commit.tree[dir] else - tmp_entry = rugged.lookup(tmp_entry[:oid])[dir] + tmp_entry = rugged.lookup(tmp_entry[:oid]) + return nil unless tmp_entry.type == :tree + tmp_entry = tmp_entry[dir] end end tmp_entry end