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 <clayne@anodized.com> Signed-off-by: Eric Wong <e@80x24.org>
This commit is contained in:
parent
cf4c2cfe52
commit
19e9542fa2
@ -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\+]+://#) {
|
||||
|
Loading…
Reference in New Issue
Block a user