update_treemap

in lib/rugged_adapter/git_layer_rugged.rb [512:529]


      def update_treemap(path, data)
        
        path = path[1..-1] if path[0] == ::File::SEPARATOR
        path = path.split(::File::SEPARATOR)
        last = path.pop

        current = @treemap

        path.each do |dir|
          current[dir] ||= {}
          node = current[dir]
          current = node
        end

        current[last] = data
        @treemap
      end