class Rugged::Tree

def diff(other = nil, options = nil)

def diff(other = nil, options = nil)
  Tree.diff(repo, self, other, options)
end

def each_blob

Iterate over the blobs in this tree
def each_blob
  self.each { |e| yield e if e[:type] == :blob }
end

def each_tree

Iterat over the subtrees in this tree
def each_tree
  self.each { |e| yield e if e[:type] == :tree }
end

def inspect

def inspect
  data = "#<Rugged::Tree:#{object_id} {oid: #{oid}}>\n"
  self.each { |e| data << "  <\"#{e[:name]}\" #{e[:oid]}>\n" }
  data
end

def walk_blobs(mode=:postorder)

Walks the tree but only yields blobs
def walk_blobs(mode=:postorder)
  self.walk(mode) { |root, e| yield root, e if e[:type] == :blob }
end

def walk_trees(mode=:postorder)

Walks the tree but only yields subtrees
def walk_trees(mode=:postorder)
  self.walk(mode) { |root, e| yield root, e if e[:type] == :tree }
end