# File lib/grit/repo.rb, line 503 def lstree(treeish = 'master', options = {}) # check recursive option opts = {:timeout => false, :l => true, :t => true} if options[:recursive] opts[:r] = true end # mode, type, sha, size, path revs = self.git.native(:ls_tree, opts, treeish) lines = revs.split("\n") revs = lines.map do |a| stuff, path = a.split("\t") mode, type, sha, size = stuff.split(" ") entry = {:mode => mode, :type => type, :sha => sha, :path => path} entry[:size] = size.strip.to_i if size.strip != '-' entry end revs end