From: Christopher Layne Date: Sun, 3 Jul 2016 05:39:23 +0000 (+0000) Subject: git-svn: clone: Fail on missing url argument X-Git-Tag: v2.10.0-rc0~133^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19e9542fa29ec3027a5169ac5d1fc740405dc234;p=thirdparty%2Fgit.git git-svn: clone: Fail on missing url argument cmd_clone should detect a missing $url arg before using it otherwise an uninitialized value error is emitted in even the simplest case of 'git svn clone' without arguments. Signed-off-by: Christopher Layne Signed-off-by: Eric Wong --- diff --git a/git-svn.perl b/git-svn.perl index 05eced06cd..f609e54ce3 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -507,7 +507,10 @@ sub init_subdir { sub cmd_clone { my ($url, $path) = @_; - if (!defined $path && + if (!$url) { + die "SVN repository location required ", + "as a command-line argument\n"; + } elsif (!defined $path && (defined $_trunk || @_branches || @_tags || defined $_stdlayout) && $url !~ m#^[a-z\+]+://#) {