@@ -39,7 +39,7 @@ abstract class AbstractTest extends TestCase
3939     * 
4040     * @return Repository 
4141     */ 
42-     public  static  function  createEmptyRepository ($ baretrue )
42+     public  static  function  createEmptyRepository ($ baretrue ,  $ separateGitDir  =  false )
4343    {
4444        $ dirself ::createTempDir ();
4545        $ repositoryinit ($ dir$ bareself ::getOptions ());
@@ -56,6 +56,7 @@ public static function provideFoobar()
5656        return  [
5757            [self ::createFoobarRepository ()],
5858            [self ::createFoobarRepository (false )],
59+             [self ::createFoobarRepository (false , true )]
5960        ];
6061    }
6162
@@ -75,10 +76,12 @@ public static function provideEmpty()
7576     * 
7677     * @return Repository 
7778     */ 
78-     public  static  function  createFoobarRepository ($ baretrue )
79+     public  static  function  createFoobarRepository ($ baretrue ,  $ separateGitDirectory  =  false )
7980    {
81+         $ args$ separateGitDirectory'--separate-git-dir= '  . tempnam (sys_get_temp_dir (), 'gitlib_ ' )] : [];
82+ 
8083        if  (null  === self ::$ localRepository
81-             self ::$ localRepositorycloneTo (self ::createTempDir (), self ::REPOSITORY_URL , $ bareself ::getOptions ());
84+             self ::$ localRepositorycloneTo (self ::createTempDir (), self ::REPOSITORY_URL , $ bareself ::getOptions (),  $ args 
8285        }
8386
8487        $ repositoryself ::$ localRepositorycloneTo (self ::createTempDir (), $ bareself ::getOptions ());
0 commit comments