File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,31 @@ var NodeGit = require('..');
88var workdirPath = local ( "repos/workdir" ) ;
99var constWorkdirPath = local ( "repos/constworkdir" ) ;
1010
11+ const testRepos = [
12+ "repos/bare" ,
13+ "repos/blameRepo" ,
14+ "repos/cherrypick" ,
15+ "repos/clone" ,
16+ "repos/constworkdir" ,
17+ "repos/convenientLineTest" ,
18+ "repos/empty" ,
19+ "repos/index" ,
20+ "repos/index" ,
21+ "repos/merge" ,
22+ "repos/merge-head" ,
23+ "repos/new" ,
24+ "repos/newrepo" ,
25+ "repos/nonrepo" ,
26+ "repos/rebase" ,
27+ "repos/renamedFileRepo" ,
28+ "repos/revertRepo" ,
29+ "repos/stagingRepo" ,
30+ "repos/submodule" ,
31+ "repos/submodule/nodegittest/" ,
32+ "repos/tree/" ,
33+ "repos/workdir" ,
34+ ] ;
35+
1136before ( function ( ) {
1237 this . timeout ( 350000 ) ;
1338
@@ -62,12 +87,12 @@ before(function() {
6287 return fse . writeFile ( local ( "home" , ".gitconfig" ) ,
6388 "[user]\n name = John Doe\n email = johndoe@example.com" ) ;
6489 } )
65- . then ( function ( ) {
66- return exec ( `git config --global --add safe.directory ${ workdirPath } ` ) ;
90+ . then ( async function ( ) {
91+ //mark all test repos as safe
92+ for ( let repo of testRepos ) {
93+ await exec ( `git config --global --add safe.directory ${ local ( repo ) } ` ) ;
94+ }
6795 } )
68- . then ( function ( ) {
69- return exec ( `git config --global --add safe.directory ${ constWorkdirPath } ` ) ;
70- } ) ;
7196} ) ;
7297
7398beforeEach ( function ( ) {
You can’t perform that action at this time.
0 commit comments