@@ -40,44 +40,44 @@ describe("Revwalk", function() {
4040 var test = this ;
4141
4242 return test . walker . next ( ) . then ( function ( commit ) {
43- return test . walker . next ( ) . then ( function ( commit ) {
44- return test . walker . next ( ) . then ( function ( commit ) {
45- return test . walker . next ( ) . then ( function ( commit ) {
46- assert . equal ( commit . toString ( ) ,
47- "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ;
48- test . walker = test . repository . createRevWalk ( ) ;
49- test . walker . push ( test . branch . id ( ) ) ;
50- test . walker . hide (
51- Oid . fromString ( "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ) ;
43+ return test . walker . next ( ) ;
44+ } ) . then ( function ( ) {
45+ return test . walker . next ( ) ;
46+ } ) . then ( function ( ) {
47+ return test . walker . next ( ) ;
48+ } ) . then ( function ( commit ) {
49+ assert . equal ( commit . toString ( ) ,
50+ "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ;
51+ test . walker = test . repository . createRevWalk ( ) ;
52+ test . walker . push ( test . branch . id ( ) ) ;
53+ test . walker . hide (
54+ Oid . fromString ( "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ) ;
5255
53- return test . walker . next ( ) . then ( function ( commit ) {
54- return test . walker . next ( ) . then ( function ( commit ) {
55- return test . walker . next ( ) . then ( function ( commit ) {
56- assert . equal ( commit . toString ( ) ,
57- "95f695136203a372751c19b6353aeb5ae32ea40e" ) ;
58- return test . walker . next ( ) . then ( function ( commit ) {
59- assert . equal ( commit , undefined ) ;
60- } ) ;
61- } ) ;
62- } ) ;
63- } ) ;
64- } ) ;
65- } ) ;
66- } ) ;
56+ return test . walker . next ( ) ;
57+ } ) . then ( function ( ) {
58+ return test . walker . next ( ) ;
59+ } ) . then ( function ( ) {
60+ return test . walker . next ( ) ;
61+ } ) . then ( function ( commit ) {
62+ assert . equal ( commit . toString ( ) ,
63+ "95f695136203a372751c19b6353aeb5ae32ea40e" ) ;
64+ return test . walker . next ( ) ;
65+ } ) . then ( function ( commit ) {
66+ assert . equal ( commit , undefined ) ;
6767 } ) ;
6868 } ) ;
6969
7070 it ( "can simplify to first parent" , function ( ) {
7171 var test = this ;
7272
7373 test . walker . simplifyFirstParent ( ) ;
74- return test . walker . next ( ) . then ( function ( commit ) {
75- return test . walker . next ( ) . then ( function ( commit ) {
76- return test . walker . next ( ) . then ( function ( commit ) {
77- assert . equal ( commit . toString ( ) ,
78- "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ;
79- } ) ;
80- } ) ;
74+ return test . walker . next ( ) . then ( function ( ) {
75+ return test . walker . next ( ) ;
76+ } ) . then ( function ( ) {
77+ return test . walker . next ( ) ;
78+ } ) . then ( function ( commit ) {
79+ assert . equal ( commit . toString ( ) ,
80+ "b8a94aefb22d0534cc0e5acf533989c13d8725dc" ) ;
8181 } ) ;
8282 } ) ;
8383
@@ -86,26 +86,26 @@ describe("Revwalk", function() {
8686 var testGC = ( global . gc ? it : it . skip ) ;
8787
8888 testGC ( "doesnt segfault when accessing .author() twice" , function ( done ) {
89- this . timeout ( 10000 ) ;
90- return Repository . open ( reposPath ) . then ( function ( repository ) {
91- var walker = repository . createRevWalk ( ) ;
92- repository . getMaster ( ) . then ( function ( master ) {
93- var did = false ;
94- walker . walk ( master , function ( error , commit ) {
95- for ( var i = 0 ; i < 1000 ; i ++ ) {
96- if ( true ) {
97- commit . author ( ) . name ( ) ;
98- commit . author ( ) . email ( ) ;
99- }
100- global . gc ( ) ;
101- }
102- if ( ! did ) {
103- done ( ) ;
104- did = true ;
89+ this . timeout ( 10000 ) ;
90+ return Repository . open ( reposPath ) . then ( function ( repository ) {
91+ var walker = repository . createRevWalk ( ) ;
92+ return repository . getMaster ( ) . then ( function ( master ) {
93+ var did = false ;
94+ walker . walk ( master , function ( error , commit ) {
95+ for ( var i = 0 ; i < 1000 ; i ++ ) {
96+ if ( true ) {
97+ commit . author ( ) . name ( ) ;
98+ commit . author ( ) . email ( ) ;
10599 }
106- } ) ;
100+ global . gc ( ) ;
101+ }
102+ if ( ! did ) {
103+ done ( ) ;
104+ did = true ;
105+ }
107106 } ) ;
108107 } ) ;
109108 } ) ;
109+ } ) ;
110110
111111} ) ;
0 commit comments