Fork me on GitHub
nodegit by tbranyen & faceleg

Tree

new Tree(rawRepo, rawTree)

Tree convenience class constructor.
Parameters:
Name Type Argument Default Description
rawRepo git.raw.Repo Raw repository object.
rawTree git.raw.Tree <optional>
new git.raw.Tree(rawRepo) Raw tree object.
Source:

Methods

entry(path, callback)

Retrieve the entry by path.
Parameters:
Name Type Description
path String Path to the tree entry, relative to repository root.
callback Tree~entryCallback
Source:

lookup(oid, callback)

Retrieve the raw tree identified by the given Oid.
Parameters:
Name Type Description
oid Oid The Oid identifying a tree.
callback Tree~lookupCallback
Source:

walk(blobsOnly) → {EventEmitter}

Walk the tree.
Parameters:
Name Type Argument Default Description
blobsOnly Boolean <optional>
true True to emit only blob & blob executable entries.
Source:
Fires:
Returns:
Type
EventEmitter

Type Definitions

entryCallback(error, entry)

Parameters:
Name Type Description
error GitError | null An Error or null if successful.
entry Entry | null The tree entry object or null.
Source:

lookupCallback(error, tree)

Parameters:
Name Type Description
error GitError | null An Error or null if successful.
tree Tree | null The tree object or null.
Source:

Events

end

End event.
Parameters:
Name Type Description
error GitError | null An error object if there was an issue, null otherwise.
entries Entry[] The tree entries.
Source:

entry

Entry event.
Parameters:
Name Type Description
error GitError | null An error object if there was an issue, null otherwise.
entry Entry The tree entry.
Source: