lib/gitlab_git/repository.rb
def tree_entry(commit, path)
        pathname = Pathname.new(path)
        tmp_entry = nil

        pathname.each_filename do |dir|
          if tmp_entry.nil?
            tmp_entry = commit.tree[dir]
          else
            tmp_entry = rugged.lookup(tmp_entry[:oid])
            return nil unless tmp_entry.type == :tree
            tmp_entry = tmp_entry[dir]
          end
        end

        tmp_entry
      end
# Find the entry for +path+ in the tree for +commit+
Find the entry for +path+ in the tree for +commit+
Find the entry for + path + in the tree for + commit +
def tree_entry(commit, path)
        pathname = Pathname.new(path)
        tmp_entry = nil
        pathname.each_filename do |dir|
          if tmp_entry.nil?
            tmp_entry = commit.tree[dir]
          else
            tmp_entry = rugged.lookup(tmp_entry[:oid])
            return nil unless tmp_entry.type == :tree
            tmp_entry = tmp_entry[dir]
          end
        end
        tmp_entry
      end
def tree_entry ( commit , path ) pathname = Pathname . new ( path ) tmp_entry = nil pathname . each_filename do | dir | if tmp_entry . nil? tmp_entry = commit . tree [ dir ] else tmp_entry = rugged . lookup ( tmp_entry [ :oid ] ) return nil unless tmp_entry . type == :tree tmp_entry = tmp_entry [ dir ] end end tmp_entry end
Find the entry for +path+ in the tree for +commit+
Find the entry for + path + in the tree for + commit +
commit
path