def tree
      @tree and return @tree 
      @tree = []
      file_set = version_files

      while child = file_set.shift
        tree << child #if child.dir?

        if child.type == "dir"
          file_set.unshift( github.where(child.path).contents ).flatten!
        end
      end

      @tree
    end
def tree
      @tree and return @tree 
      @tree = []
      file_set = version_files

      while child = file_set.shift
        tree << child 

        if child.type == "dir"
          file_set.unshift( github.where(child.path).contents ).flatten!
        end
      end

      @tree
    end
def tree @tree and return @tree @tree = [ ] file_set = version_files while child = file_set . shift tree << child #if child.dir? if child . type == "dir" file_set . unshift ( github . where ( child . path ) . contents ) . flatten! end end @tree end
build a depth first tree
build a depth first tree