git svn clone: Use of uninitialized value in string eq at %git-core%/git-svn line 3015
I'm using msysgit on Windows XP to clone a SVN repo. After a long time waiting, I got some errors and the clone could not go on. It says that: Use of uninitialized value in string eq at git-core/git-svn line 3015. I found in this file the code is:
last if ($ur开发者_如何学编程l eq $gs->full_url);
I've no idea how to solve this problem. Git has create many branches here, each appends a -, such as
refs/remotes/2.0@3044
refs/remotes/2.0@3044- refs/remotes/2.0@3044-- refs/remotes/2.0@3044--- refs/remotes/2.0@3044----
and so on.
Could you tell me how to solve this problem? Thank you!
I was hoping someone with more knowledge would answer, but here is what I have found. I'm using the same tool, my $VERSION at the top is '1.7.6.msysgit.0'.
Around line 3015 I see this chunk of code:
while (1) {
# It is possible to tag two different subdirectories at
# the same revision. If the url for an existing ref
# does not match, we must either find a ref with a
# matching url or create a new ref by growing a tail.
$gs = Git::SVN->init($u, $p, $repo_id, $ref_id, 1);
my (undef, $max_commit) = $gs->rev_map_max(1);
last if (!$max_commit);
my ($url) = ::cmt_metadata($max_commit);
last if ($url eq $gs->full_url);
$ref_id .= '-';
}
print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1;
Line 3015 is the "last if ($url eq $gs->full_url);" so $url or $gs->full_url is undefined, a condition the program is not prepared to handle. I suspect that something in the structure of the repository has confused it. In any case, we can probably assume that a matching url has not been found, and exit the loop. So if I were you I would be tempted to try adding "last unless (defined $url && define $gs->full_url);" before 3015 and see what happens. It may work, it may not.
Actually debugging the program would start with seeing which is undefined and figuring out why. The author might be interested in fixing it, especially if you could send a copy of the repository.
精彩评论