File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -227,5 +227,12 @@ public void CloningAnUrlWithoutPathThrows()
227227
228228 Assert . Throws < InvalidSpecificationException > ( ( ) => Repository . Clone ( "http://github.com" , scd . DirectoryPath ) ) ;
229229 }
230+
231+ [ Theory ]
232+ [ InlineData ( "git://github.com/libgit2/TestGitRepository" ) ]
233+ public void CloningWithoutWorkdirPathThrows ( string url )
234+ {
235+ Assert . Throws < ArgumentNullException > ( ( ) => Repository . Clone ( url , null ) ) ;
236+ }
230237 }
231238}
Original file line number Diff line number Diff line change @@ -538,6 +538,8 @@ public static string Discover(string startingPath)
538538 public static string Clone ( string sourceUrl , string workdirPath ,
539539 CloneOptions options = null )
540540 {
541+ Ensure . ArgumentNotNull ( workdirPath , "workdirPath" ) ;
542+
541543 options = options ?? new CloneOptions ( ) ;
542544
543545 using ( GitCheckoutOptsWrapper checkoutOptionsWrapper = new GitCheckoutOptsWrapper ( options ) )
You can’t perform that action at this time.
0 commit comments