@@ -16,9 +16,7 @@ public class FetchFixture : BaseFixture
16
16
[ InlineData ( "git://github.com/libgit2/TestGitRepository.git" ) ]
17
17
public void CanFetchIntoAnEmptyRepository ( string url )
18
18
{
19
- string repoPath = InitNewRepository ( ) ;
20
-
21
- using ( var repo = new Repository ( repoPath ) )
19
+ using ( var repo = InitIsolatedRepository ( ) )
22
20
{
23
21
Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
24
22
@@ -55,9 +53,7 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
55
53
InconclusiveIf ( ( ) => string . IsNullOrEmpty ( Constants . PrivateRepoUrl ) ,
56
54
"Populate Constants.PrivateRepo* to run this test" ) ;
57
55
58
- string repoPath = InitNewRepository ( ) ;
59
-
60
- using ( var repo = new Repository ( repoPath ) )
56
+ using ( var repo = InitIsolatedRepository ( ) )
61
57
{
62
58
Remote remote = repo . Network . Remotes . Add ( remoteName , Constants . PrivateRepoUrl ) ;
63
59
@@ -79,9 +75,7 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
79
75
[ InlineData ( "git://github.com/libgit2/TestGitRepository.git" ) ]
80
76
public void CanFetchAllTagsIntoAnEmptyRepository ( string url )
81
77
{
82
- string repoPath = InitNewRepository ( ) ;
83
-
84
- using ( var repo = new Repository ( repoPath ) )
78
+ using ( var repo = InitIsolatedRepository ( ) )
85
79
{
86
80
Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
87
81
@@ -116,9 +110,7 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
116
110
[ InlineData ( "git://github.com/libgit2/TestGitRepository.git" , "master" , "first-merge" ) ]
117
111
public void CanFetchCustomRefSpecsIntoAnEmptyRepository ( string url , string localBranchName , string remoteBranchName )
118
112
{
119
- string repoPath = InitNewRepository ( ) ;
120
-
121
- using ( var repo = new Repository ( repoPath ) )
113
+ using ( var repo = InitIsolatedRepository ( ) )
122
114
{
123
115
Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
124
116
@@ -153,9 +145,7 @@ public void FetchRespectsConfiguredAutoTagSetting(TagFetchMode tagFetchMode, int
153
145
{
154
146
string url = "http://github.com/libgit2/TestGitRepository" ;
155
147
156
- string repoPath = InitNewRepository ( ) ;
157
-
158
- using ( var repo = new Repository ( repoPath ) )
148
+ using ( var repo = InitIsolatedRepository ( ) )
159
149
{
160
150
Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
161
151
Assert . NotNull ( remote ) ;
0 commit comments