Class RevisionWalker
- Defined in: bindings.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
A RevisionWalker provides a clean interface to walk the commit history of a
Repository.
|
Method Summary
| Method Attributes | Method Name and Description |
|---|---|
|
hide(commit, callback)
Hides a specific Commit (and all its ancestors/descendants) from the walker.
|
|
|
next(callback)
Gets the next Commit in the queue from the RevisionWalker.
|
|
|
push(commit, callback)
Pushes a Commit onto the Revision Walker to begin the walking process.
|
|
|
reset(callback)
Resets the RevisionWalker to an identity state ready to begin another walk.
|
|
|
sort(sorting, callback)
Sets a specific sorting method on the RevisionWalker.
|
Class Detail
RevisionWalker()
A RevisionWalker provides a clean interface to walk the commit history of a
Repository. A RevisionWalker may be obtained via Repository#createWalker
Method Detail
-
{Boolean} hide(commit, callback)Hides a specific Commit (and all its ancestors/descendants) from the walker.
- Parameters:
- {String|Commit} commit
- The commit to ignore. Can either be a sha1 id string, or a previously loaded Commit.
- {Function} callback Optional
- If provided, the hide process will be performed in a non-blocking fashion, and the results passed back to the callback.
- Throws:
- If there was an error hiding the Commit.
- Returns:
- {Boolean} true if successful.
-
{Commit} next(callback)Gets the next Commit in the queue from the RevisionWalker.
- Parameters:
- {Function} callback Optional
- If provided, the next Commit will be retrieved asynchronously, and the results passed back to callback.
- Throws:
- If an error occurs while getting the next Commit.
- Returns:
- {Commit}
-
{Boolean} push(commit, callback)Pushes a Commit onto the Revision Walker to begin the walking process.
- Parameters:
- {String|Commit} commit
- The commit to push onto the walker. Can either be an sha1 id string, or a previously loaded Commit.
- callback
- Throws:
- If there was an error pushing the Commit.
- Returns:
- {Boolean} true if successful.
-
{Boolean} reset(callback)Resets the RevisionWalker to an identity state ready to begin another walk.
- Parameters:
- {Function} callback Optional
- If provided, the walker will be reset asynchronously and the results passed to the callback.
- Throws:
- If an error occurred.
- Returns:
- {Boolean} true if successful.
-
{Boolean} sort(sorting, callback)Sets a specific sorting method on the RevisionWalker.
- Parameters:
- {Integer} sorting
- The sorting method to use on this walker. The valid values are Gitteh.GIT_SORT_NONE, Gitteh.GIT_SORT_TOPOLOGICAL, Gitteh.GIT_SORT_TIME, and Gitteh.GIT_SORT_REVERSE.
- {Function} callback Optional
- If provided, walker will be configured with sorting options in a non-blocking manner, and the results of the operation passsed to the callback.
- Throws:
- If an error occurred while setting sorting.
- Returns:
- {Boolean} true if successful.
- See:
- Gitteh.GIT_SORT_NONE
- Gitteh.GIT_SORT_TOPOLOGICAL
- Gitteh.GIT_SORT_TIME
- Gitteh.GIT_SORT_REVERSE