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:
- tree.js, line 12
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:
- tree.js, line 52
-
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:
- tree.js, line 31
-
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:
- tree.js, line 76
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:
- tree.js, line 53
-
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:
- tree.js, line 32
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:
- tree.js, line 100
-
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:
- tree.js, line 89