@@ -42,7 +42,7 @@ public void CanFetchIntoAnEmptyRepository(string url)
4242 }
4343
4444 // Perform the actual fetch
45- Commands . Fetch ( repo , remoteName , new string [ 0 ] , new FetchOptions { OnUpdateTips = expectedFetchState . RemoteUpdateTipsHandler } , null ) ;
45+ Commands . Fetch ( repo , remoteName , Array . Empty < string > ( ) , new FetchOptions { OnUpdateTips = expectedFetchState . RemoteUpdateTipsHandler } , null ) ;
4646
4747 // Verify the expected
4848 expectedFetchState . CheckUpdatedReferences ( repo ) ;
@@ -62,7 +62,7 @@ public void CanFetchIntoAnEmptyRepositoryWithCredentials()
6262 repo . Network . Remotes . Add ( remoteName , Constants . PrivateRepoUrl ) ;
6363
6464 // Perform the actual fetch
65- Commands . Fetch ( repo , remoteName , new string [ 0 ] , new FetchOptions
65+ Commands . Fetch ( repo , remoteName , Array . Empty < string > ( ) , new FetchOptions
6666 {
6767 CredentialsProvider = Constants . PrivateRepoCredentials
6868 } , null ) ;
@@ -98,7 +98,7 @@ public void CanFetchAllTagsIntoAnEmptyRepository(string url)
9898 }
9999
100100 // Perform the actual fetch
101- Commands . Fetch ( repo , remoteName , new string [ 0 ] , new FetchOptions
101+ Commands . Fetch ( repo , remoteName , Array . Empty < string > ( ) , new FetchOptions
102102 {
103103 TagFetchMode = TagFetchMode . All ,
104104 OnUpdateTips = expectedFetchState . RemoteUpdateTipsHandler
@@ -179,7 +179,7 @@ public void FetchRespectsConfiguredAutoTagSetting(TagFetchMode tagFetchMode, int
179179 r => r . TagFetchMode = tagFetchMode ) ;
180180
181181 // Perform the actual fetch.
182- Commands . Fetch ( repo , remoteName , new string [ 0 ] , null , null ) ;
182+ Commands . Fetch ( repo , remoteName , Array . Empty < string > ( ) , null , null ) ;
183183
184184 // Verify the number of fetched tags.
185185 Assert . Equal ( expectedTagCount , repo . Tags . Count ( ) ) ;
@@ -197,7 +197,7 @@ public void CanFetchAllTagsAfterAnInitialClone()
197197
198198 using ( var repo = new Repository ( clonedRepoPath ) )
199199 {
200- Commands . Fetch ( repo , "origin" , new string [ 0 ] , new FetchOptions { TagFetchMode = TagFetchMode . All } , null ) ;
200+ Commands . Fetch ( repo , "origin" , Array . Empty < string > ( ) , new FetchOptions { TagFetchMode = TagFetchMode . All } , null ) ;
201201 }
202202 }
203203
@@ -223,17 +223,17 @@ public void FetchHonorsTheFetchPruneConfigurationEntry()
223223
224224 // No pruning when the configuration entry isn't defined
225225 Assert . Null ( clonedRepo . Config . Get < bool > ( "fetch.prune" ) ) ;
226- Commands . Fetch ( clonedRepo , "origin" , new string [ 0 ] , null , null ) ;
226+ Commands . Fetch ( clonedRepo , "origin" , Array . Empty < string > ( ) , null , null ) ;
227227 Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
228228
229229 // No pruning when the configuration entry is set to false
230230 clonedRepo . Config . Set < bool > ( "fetch.prune" , false ) ;
231- Commands . Fetch ( clonedRepo , "origin" , new string [ 0 ] , null , null ) ;
231+ Commands . Fetch ( clonedRepo , "origin" , Array . Empty < string > ( ) , null , null ) ;
232232 Assert . Equal ( 5 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
233233
234234 // Auto pruning when the configuration entry is set to true
235235 clonedRepo . Config . Set < bool > ( "fetch.prune" , true ) ;
236- Commands . Fetch ( clonedRepo , "origin" , new string [ 0 ] , null , null ) ;
236+ Commands . Fetch ( clonedRepo , "origin" , Array . Empty < string > ( ) , null , null ) ;
237237 Assert . Equal ( 4 , clonedRepo . Branches . Count ( b => b . IsRemote && b . FriendlyName != "origin/HEAD" ) ) ;
238238 }
239239 }
@@ -248,10 +248,10 @@ public void CannotFetchWithForbiddenCustomHeaders()
248248 string clonedRepoPath = Repository . Clone ( url , scd . DirectoryPath ) ;
249249
250250 const string knownHeader = "User-Agent: mygit-201" ;
251- var options = new FetchOptions { CustomHeaders = new String [ ] { knownHeader } } ;
251+ var options = new FetchOptions { CustomHeaders = new string [ ] { knownHeader } } ;
252252 using ( var repo = new Repository ( clonedRepoPath ) )
253253 {
254- Assert . Throws < LibGit2SharpException > ( ( ) => Commands . Fetch ( repo , "origin" , new string [ 0 ] , options , null ) ) ;
254+ Assert . Throws < LibGit2SharpException > ( ( ) => Commands . Fetch ( repo , "origin" , Array . Empty < string > ( ) , options , null ) ) ;
255255 }
256256 }
257257
@@ -265,10 +265,10 @@ public void CanFetchWithCustomHeaders()
265265 string clonedRepoPath = Repository . Clone ( url , scd . DirectoryPath ) ;
266266
267267 const string knownHeader = "X-Hello: mygit-201" ;
268- var options = new FetchOptions { CustomHeaders = new String [ ] { knownHeader } } ;
268+ var options = new FetchOptions { CustomHeaders = new string [ ] { knownHeader } } ;
269269 using ( var repo = new Repository ( clonedRepoPath ) )
270270 {
271- Commands . Fetch ( repo , "origin" , new string [ 0 ] , options , null ) ;
271+ Commands . Fetch ( repo , "origin" , Array . Empty < string > ( ) , options , null ) ;
272272 }
273273 }
274274
@@ -282,10 +282,10 @@ public void CannotFetchWithMalformedCustomHeaders()
282282 string clonedRepoPath = Repository . Clone ( url , scd . DirectoryPath ) ;
283283
284284 const string knownHeader = "Hello world" ;
285- var options = new FetchOptions { CustomHeaders = new String [ ] { knownHeader } } ;
285+ var options = new FetchOptions { CustomHeaders = new string [ ] { knownHeader } } ;
286286 using ( var repo = new Repository ( clonedRepoPath ) )
287287 {
288- Assert . Throws < LibGit2SharpException > ( ( ) => Commands . Fetch ( repo , "origin" , new string [ 0 ] , options , null ) ) ;
288+ Assert . Throws < LibGit2SharpException > ( ( ) => Commands . Fetch ( repo , "origin" , Array . Empty < string > ( ) , options , null ) ) ;
289289 }
290290 }
291291
0 commit comments