Merge branch 'master' of git://bogomips.org/git-svn
authorJunio C Hamano <gitster@pobox.com>
Mon, 11 Jul 2016 17:31:52 +0000 (10:31 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Jul 2016 17:31:52 +0000 (10:31 -0700)
* 'master' of git://bogomips.org/git-svn:
git-svn: warn instead of dying when commit data is missing
git-svn: clone: Fail on missing url argument

git-svn.perl
perl/Git/SVN.pm
index 05eced06cde8a1ff83262d452dc8edbcc1f3dea8..f609e54ce3b3d5a0f004de6d40390a9fdae4f6a9 100755 (executable)
@@ -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\+]+://#) {
index bee1e7d1cba38242cb7f457011a96cd3d02a6653..018beb85a09d6ef524c326c3ec947982c05bf556 100644 (file)
@@ -97,8 +97,12 @@ sub resolve_local_globs {
                                    "existing: $existing\n",
                                    " globbed: $refname\n";
                        }
-                       my $u = (::cmt_metadata("$refname"))[0] or die
-                           "$refname: no associated commit metadata\n";
+                       my $u = (::cmt_metadata("$refname"))[0];
+                       if (!defined($u)) {
+                               warn
+"W: $refname: no associated commit metadata from SVN, skipping\n";
+                               next;
+                       }
                        $u =~ s!^\Q$url\E(/|$)!! or die
                          "$refname: '$url' not found in '$u'\n";
                        if ($pathname ne $u) {