@@ -304,15 +304,19 @@ describe("Stage", function() {
304
304
return index . writeTree ( ) ;
305
305
} )
306
306
. then ( function ( oid ) {
307
- var signature = NodeGit . Signature . create ( "Foo bar" ,
308
- "[email protected] " , 123456789 , 60 ) ;
309
- return test . repository . createCommit ( "HEAD" , signature , signature ,
310
- "initial commit" , oid , [ ] ) ;
307
+ return test . repository . getHeadCommit ( )
308
+ . then ( function ( parent ) {
309
+ var signature = NodeGit . Signature . create ( "Foo bar" ,
310
+ "[email protected] " , 123456789 , 60 ) ;
311
+ return test . repository . createCommit ( "HEAD" , signature , signature ,
312
+ "initial commit" , oid , [ parent ] ) ;
313
+ } ) ;
311
314
//... alright, we did a commit.
312
315
} )
313
- //Now if we compare head commit to index, should be a filemode change
316
+ // Now if we compare head commit to the workdir,
317
+ // there shouldn't be a filemode change
314
318
. then ( function ( ) {
315
- return compareFilemodes ( false , index , 0111 /* expect +x */ ) ;
319
+ return compareFilemodes ( true , null , 0 ) ;
316
320
} ) ;
317
321
} ) ;
318
322
0 commit comments