Skip to content

Commit ebedc29

Browse files
committed
Updated revwalk to iterate over all revisions
1 parent 2a900f5 commit ebedc29

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

lib/revwalk.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,20 @@ var _RevWalk = function( obj ) {
1717

1818
self.revwalk.push( commit );
1919

20-
var _tmp = git.commit( self.repo );
21-
self.revwalk.next( _tmp.commit, function() {
22-
var args = Array.prototype.slice.call( arguments );
23-
args[0] = git.util().error( args[0] );
20+
function walk() {
21+
var _tmp = git.commit( self.repo );
22+
self.revwalk.next( _tmp.commit, function( err ) {
23+
if( err ) { return; }
2424

25-
callback.apply( _tmp, args.concat( _tmp ) );
26-
});
25+
var args = Array.prototype.slice.call( arguments );
26+
args[0] = git.util().error( args[0] );
27+
28+
callback.apply( _tmp, args.concat( _tmp ) );
29+
walk();
30+
});
31+
}
32+
33+
walk();
2734
};
2835

2936
return self;

0 commit comments

Comments
 (0)