Revwalk.create Sync

var revwalk = Revwalk.create(repo);
Parameters Type  
repo Repository the repo to walk through
Returns  
Revwalk  

Revwalk#fastWalk Async

revwalk.fastWalk(max_count).then(function(stdVectorGitOid) {
  // Use stdVectorGitOid
});
Parameters Type  
max_count Number  
Returns  
StdVectorGitOid  

Revwalk#fileHistoryWalk Async

revwalk.fileHistoryWalk(filePath, max_count).then(function(arrayHistoryEntry) {
  // Use arrayHistoryEntry
});
Parameters Type  
filePath String  
max_count Number  
Returns  
Array<historyEntry>  

Revwalk#getCommits Async

revwalk.getCommits(count).then(function(arrayCommit) {
  // Use arrayCommit
});

Get a number of commits.

Parameters Type  
count Number (default: 10)
Returns  
Array<Commit>  

Revwalk#getCommitsUntil Async

revwalk.getCommitsUntil(checkFn).then(function(array) {
  // Use array
});

Walk the history grabbing commits until the checkFn called with the current commit returns false.

Parameters Type  
checkFn Function function returns false to stop walking
Returns  
Array  

Revwalk#hide Sync

var result = revwalk.hide(commit_id);
Parameters Type  
commit_id Oid the oid of commit that will be ignored during the traversal
Returns  
Number 0 or an error code

Revwalk#hideGlob Sync

var result = revwalk.hideGlob(glob);
Parameters Type  
glob String the glob pattern references should match
Returns  
Number 0 or an error code

Revwalk#hideHead Sync

var result = revwalk.hideHead();
Returns  
Number 0 or an error code

Revwalk#hideRef Sync

var result = revwalk.hideRef(refname);
Parameters Type  
refname String the reference to hide
Returns  
Number 0 or an error code

Revwalk#next Async

revwalk.next().then(function(oid) {
  // Use oid
});
Returns  
Oid the oid of the next commit

Revwalk#push Sync

var result = revwalk.push(id);
Parameters Type  
id Oid the oid of the commit to start from.
Returns  
Number 0 or an error code

Revwalk#pushGlob Sync

var result = revwalk.pushGlob(glob);
Parameters Type  
glob String the glob pattern references should match
Returns  
Number 0 or an error code

Revwalk#pushHead Sync

var result = revwalk.pushHead();
Returns  
Number 0 or an error code

Revwalk#pushRange Sync

var result = revwalk.pushRange(range);
Parameters Type  
range String the range
Returns  
Number 0 or an error code

Revwalk#pushRef Sync

var result = revwalk.pushRef(refname);
Parameters Type  
refname String the reference to push
Returns  
Number 0 or an error code

Revwalk#repository Sync

var repository = revwalk.repository();
Returns  
Repository the repository being walked

Revwalk#reset Sync

revwalk.reset();

Revwalk#simplifyFirstParent Sync

revwalk.simplifyFirstParent();

Revwalk#sorting Sync

revwalk.sorting(sort);

Set the sort order for the revwalk. This function takes variable arguments like revwalk.sorting(NodeGit.RevWalk.Topological, NodeGit.RevWalk.Reverse).

Parameters Type  
sort Number  

Revwalk#walk Sync

revwalk.walk(oid, callback);

Walk the history from the given oid. The callback is invoked for each commit; When the walk is over, the callback is invoked with (null, null).

Parameters Type  
oid Oid  
callback Function  

Revwalk.SORT ENUM

Flag Value
Revwalk.SORT.NONE 0
Revwalk.SORT.TOPOLOGICAL 1
Revwalk.SORT.TIME 2
Revwalk.SORT.REVERSE 4