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()
227
227
228
228
Assert . Throws < InvalidSpecificationException > ( ( ) => Repository . Clone ( "http://github.com" , scd . DirectoryPath ) ) ;
229
229
}
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
+ }
230
237
}
231
238
}
Original file line number Diff line number Diff line change @@ -538,6 +538,8 @@ public static string Discover(string startingPath)
538
538
public static string Clone ( string sourceUrl , string workdirPath ,
539
539
CloneOptions options = null )
540
540
{
541
+ Ensure . ArgumentNotNull ( workdirPath , "workdirPath" ) ;
542
+
541
543
options = options ?? new CloneOptions ( ) ;
542
544
543
545
using ( GitCheckoutOptsWrapper checkoutOptionsWrapper = new GitCheckoutOptsWrapper ( options ) )
You can’t perform that action at this time.
0 commit comments