summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorChristopher Layne <clayne@anodized.com>2016-07-03 05:39:23 (GMT)
committerEric Wong <e@80x24.org>2016-07-03 06:04:47 (GMT)
commit19e9542fa29ec3027a5169ac5d1fc740405dc234 (patch)
treeba01da1ab91c605d02a018f0f4ac12da76137609 /git-svn.perl
parentcf4c2cfe52be5bd973a4838f73a35d3959ce2f43 (diff)
downloadgit-19e9542fa29ec3027a5169ac5d1fc740405dc234.zip
git-19e9542fa29ec3027a5169ac5d1fc740405dc234.tar.gz
git-19e9542fa29ec3027a5169ac5d1fc740405dc234.tar.bz2
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>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 05eced0..f609e54 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\+]+://#) {