git svn clone:在 %git-core%/git-svn 第 3015 行的字符串 eq 中使用未初始化的值

发布于 2024-12-09 16:25:43 字数 454 浏览 1 评论 0原文

我在 Windows XP 上使用 msysgit 克隆 SVN 存储库。等了很久,出现一些错误,克隆无法继续。它说:在 git-core/git-svn 第 3015 行的字符串 eq 中使用未初始化的值。我在这个文件中发现代码是:

最后一个 if ($url eq $gs->full_url);

我不知道如何解决这个问题。 Git在这里创建了很多分支,每个分支都附加一个-,比如

refs/remotes/2.0@3044
参考/远程/2.0@3044-
参考/远程/2.0@3044--
refs/remotes/2.0@3044---
refs/remotes/2.0@3044----

等等。

你能告诉我如何解决这个问题吗?谢谢你!

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 ($url 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只有一腔孤勇 2024-12-16 16:25:43

我希望有更多知识的人能够回答,但这就是我发现的。
我使用相同的工具,顶部的 $VERSION 是“1.7.6.msysgit.0”。

在第 3015 行左右,我看到了这段代码:

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;

第 3015 行是“最后的 if ($url eq $gs->full_url);”因此 $url 或 $gs->full_url 未定义,程序不准备处理这种情况。我怀疑存储库结构中的某些内容混淆了它。无论如何,我们可以假设尚未找到匹配的 url,并退出循环。因此,如果我是你,我会很想尝试添加“last except (define $url && Define $gs->full_url);” 3015 年之前,看看会发生什么。它可能有效,也可能无效。

实际上调试程序首先要查看哪些未定义并找出原因。作者可能有兴趣修复它,特别是如果您可以发送存储库的副本。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文