Skip to content

Commit 19e9542

Browse files
clayneEric Wong
authored andcommitted
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>
1 parent cf4c2cf commit 19e9542

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

git-svn.perl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,10 @@ sub init_subdir {
507507

508508
sub cmd_clone {
509509
my ($url, $path) = @_;
510-
if (!defined $path &&
510+
if (!$url) {
511+
die "SVN repository location required ",
512+
"as a command-line argument\n";
513+
} elsif (!defined $path &&
511514
(defined $_trunk || @_branches || @_tags ||
512515
defined $_stdlayout) &&
513516
$url !~ m#^[a-z\+]+://#) {

0 commit comments

Comments
 (0)