File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,31 @@ describe("Diff", function() {
274274 } ) ;
275275 } ) ;
276276
277+ it ( "can pass undefined pathspec as option to indexToWorkdir" , function ( ) {
278+ var test = this ;
279+
280+ return Repository . open ( reposPath ) . then ( function ( repository ) {
281+ test . repository = repository ;
282+
283+ return repository . openIndex ( ) ;
284+ } )
285+ . then ( function ( index ) {
286+ test . index = index ;
287+
288+ return test . repository . getBranchCommit ( "master" ) ;
289+ } )
290+ . then ( function ( ) {
291+ var opts = {
292+ flags : Diff . OPTION . INCLUDE_UNTRACKED |
293+ Diff . OPTION . RECURSE_UNTRACKED_DIRS ,
294+ pathspec : undefined
295+ } ;
296+
297+ // should not segfault
298+ return Diff . indexToWorkdir ( test . repository , test . index , opts ) ;
299+ } ) ;
300+ } ) ;
301+
277302 // This wasn't working before. It was only passing because the promise chain
278303 // was broken
279304 it . skip ( "can find similar files in a diff" , function ( ) {
You can’t perform that action at this time.
0 commit comments