@@ -567,10 +567,8 @@ public void CannotCloneWithForbiddenCustomHeaders()
567567 const string url = "https://github.com/libgit2/TestGitRepository" ;
568568
569569 const string knownHeader = "User-Agent: mygit-201" ;
570- var cloneOptions = new CloneOptions ( )
571- {
572- FetchOptions = new FetchOptions { CustomHeaders = new String [ ] { knownHeader } }
573- } ;
570+ var cloneOptions = new CloneOptions ( ) ;
571+ cloneOptions . FetchOptions . CustomHeaders = new string [ ] { knownHeader } ;
574572
575573 Assert . Throws < LibGit2SharpException > ( ( ) => Repository . Clone ( url , scd . DirectoryPath , cloneOptions ) ) ;
576574 }
@@ -583,10 +581,8 @@ public void CannotCloneWithMalformedCustomHeaders()
583581 const string url = "https://github.com/libgit2/TestGitRepository" ;
584582
585583 const string knownHeader = "hello world" ;
586- var cloneOptions = new CloneOptions ( )
587- {
588- FetchOptions = new FetchOptions { CustomHeaders = new String [ ] { knownHeader } }
589- } ;
584+ var cloneOptions = new CloneOptions ( ) ;
585+ cloneOptions . FetchOptions . CustomHeaders = new string [ ] { knownHeader } ;
590586
591587 Assert . Throws < LibGit2SharpException > ( ( ) => Repository . Clone ( url , scd . DirectoryPath , cloneOptions ) ) ;
592588 }
@@ -599,10 +595,8 @@ public void CanCloneWithCustomHeaders()
599595 const string url = "https://github.com/libgit2/TestGitRepository" ;
600596
601597 const string knownHeader = "X-Hello: world" ;
602- var cloneOptions = new CloneOptions ( )
603- {
604- FetchOptions = new FetchOptions { CustomHeaders = new String [ ] { knownHeader } }
605- } ;
598+ var cloneOptions = new CloneOptions ( ) ;
599+ cloneOptions . FetchOptions . CustomHeaders = new string [ ] { knownHeader } ;
606600
607601 var clonedRepoPath = Repository . Clone ( url , scd . DirectoryPath , cloneOptions ) ;
608602 Assert . True ( Directory . Exists ( clonedRepoPath ) ) ;
0 commit comments