lib/git_store/tree.rb
# Load this tree from a git repository.
Load this tree from a git repository.
Load this tree from a git repository .
def load_from_store
      @table = read_contents(data).inject({}) do |hash, (mode, name, id)|
        content, type = store.get_object(id)
        child = table[name] || TYPE_CLASS[type].new(store)
        child.set(id, mode, child_path(name), content)
        child.load_from_store if Tree === child
        hash[name] = child
        hash
      end
    end
def load_from_store @table = read_contents ( data ) . inject ( { } ) do | hash , ( mode , name , id ) | content , type = store . get_object ( id ) child = table [ name ] || TYPE_CLASS [ type ] . new ( store ) child . set ( id , mode , child_path ( name ) , content ) child . load_from_store if Tree === child hash [ name ] = child hash end end
Load this tree from a git repository.
Load this tree from a git repository .