@@ -16,7 +16,9 @@ public class FetchFixture : BaseFixture
1616 [ InlineData ( "git://github.com/libgit2/TestGitRepository.git" ) ]
1717 public void CanFetchIntoAnEmptyRepository ( string url )
1818 {
19- using ( var repo = InitIsolatedRepository ( ) )
19+ string path = InitNewRepository ( ) ;
20+
21+ using ( var repo = new Repository ( path ) )
2022 {
2123 Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
2224
@@ -53,7 +55,9 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
5355 InconclusiveIf ( ( ) => string . IsNullOrEmpty ( Constants . PrivateRepoUrl ) ,
5456 "Populate Constants.PrivateRepo* to run this test" ) ;
5557
56- using ( var repo = InitIsolatedRepository ( ) )
58+ string path = InitNewRepository ( ) ;
59+
60+ using ( var repo = new Repository ( path ) )
5761 {
5862 Remote remote = repo . Network . Remotes . Add ( remoteName , Constants . PrivateRepoUrl ) ;
5963
@@ -71,7 +75,9 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
7175 [ InlineData ( "git://github.com/libgit2/TestGitRepository.git" ) ]
7276 public void CanFetchAllTagsIntoAnEmptyRepository ( string url )
7377 {
74- using ( var repo = InitIsolatedRepository ( ) )
78+ string path = InitNewRepository ( ) ;
79+
80+ using ( var repo = new Repository ( path ) )
7581 {
7682 Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
7783
@@ -112,7 +118,9 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
112118 [ InlineData ( "git://github.com/libgit2/TestGitRepository.git" , "master" , "first-merge" ) ]
113119 public void CanFetchCustomRefSpecsIntoAnEmptyRepository ( string url , string localBranchName , string remoteBranchName )
114120 {
115- using ( var repo = InitIsolatedRepository ( ) )
121+ string path = InitNewRepository ( ) ;
122+
123+ using ( var repo = new Repository ( path ) )
116124 {
117125 Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
118126
@@ -139,15 +147,17 @@ public void CanFetchCustomRefSpecsIntoAnEmptyRepository(string url, string local
139147 }
140148 }
141149
142- [ Theory ( Skip = "Skipping due to recent github handling modification of --include-tag." ) ]
150+ [ Theory ]
143151 [ InlineData ( TagFetchMode . All , 4 ) ]
144152 [ InlineData ( TagFetchMode . None , 0 ) ]
145- [ InlineData ( TagFetchMode . Auto , 3 ) ]
153+ // [InlineData(TagFetchMode.Auto, 3)] // TODO: Skipping due to github modification of --include-tag handling."
146154 public void FetchRespectsConfiguredAutoTagSetting ( TagFetchMode tagFetchMode , int expectedTagCount )
147155 {
148156 string url = "http://github.com/libgit2/TestGitRepository" ;
149157
150- using ( var repo = InitIsolatedRepository ( ) )
158+ string path = InitNewRepository ( ) ;
159+
160+ using ( var repo = new Repository ( path ) )
151161 {
152162 Remote remote = repo . Network . Remotes . Add ( remoteName , url ) ;
153163 Assert . NotNull ( remote ) ;
@@ -163,5 +173,20 @@ public void FetchRespectsConfiguredAutoTagSetting(TagFetchMode tagFetchMode, int
163173 Assert . Equal ( expectedTagCount , repo . Tags . Count ( ) ) ;
164174 }
165175 }
176+
177+ [ Fact ]
178+ public void CanFetchAllTagsAfterAnInitialClone ( )
179+ {
180+ var scd = BuildSelfCleaningDirectory ( ) ;
181+
182+ const string url = "https://github.com/libgit2/TestGitRepository" ;
183+
184+ string clonedRepoPath = Repository . Clone ( url , scd . DirectoryPath ) ;
185+
186+ using ( var repo = new Repository ( clonedRepoPath ) )
187+ {
188+ repo . Fetch ( "origin" , new FetchOptions { TagFetchMode = TagFetchMode . All } ) ;
189+ }
190+ }
166191 }
167192}
0 commit comments