线程 "main"java.lang.StackOverflowError 中的 git-tf checkin 异常

标签 git tfs git-tf

我正在尝试获取现有的 git 存储库并使用 git-tf 将其 checkin 到 TFS 预览中,但在尝试 checkin 时出现错误。这是我目前所做的。

  1. git clone -b https://github.com/ .git 克隆我要 checkin 的分支。我想将一个未命名为 master 的分支 checkin TFS。

  2. cd 进入本地代码路径。

  3. git tf configure https://.tfspreview.com/DefaultCollection $/然后,我配置了 git tf 以配置 TFS 连接。

  4. git tf checkin 然后,我得到了以下错误:

签到 $/:0% git-tf: 没有 HEAD ref

  1. 然后我通过执行以下操作创建了一个主分支,因为我没有主分支:git branch -b master

  2. 切换回我 checkout 的分支:git checkout。

  3. 再次尝试 checkin :git tf checkin。

  4. 这让我克服了第一个错误。但是,我收到以下错误,我不知道该怎么办。

有没有人知道如何通过运行 git tf checkin 来克服下面的错误?

谢谢!

Connecting to TFS...
Checking in to $/Sandbox/HammerheadGitTest/sCRM: 
Exception in thread "main" java.lang.StackOverflowError
    at java.io.RandomAccessFile.seek(Native Method)
    at org.eclipse.jgit.storage.file.PackFile.read(PackFile.java:614)
    at org.eclipse.jgit.storage.file.WindowCache.load(WindowCache.java:314)
    at org.eclipse.jgit.storage.file.WindowCache.getOrLoad(WindowCache.java:393)
    at org.eclipse.jgit.storage.file.WindowCache.get(WindowCache.java:204)
    at org.eclipse.jgit.storage.file.WindowCursor.pin(WindowCursor.java:334)
    at org.eclipse.jgit.storage.file.WindowCursor.copy(WindowCursor.java:203)
    at org.eclipse.jgit.storage.file.PackFile.readFully(PackFile.java:526)
    at org.eclipse.jgit.storage.file.PackFile.load(PackFile.java:684)
    at org.eclipse.jgit.storage.file.PackFile.get(PackFile.java:227)
    at org.eclipse.jgit.storage.file.ObjectDirectory.openObject1(ObjectDirectory.java:439)
    at org.eclipse.jgit.storage.file.FileObjectDatabase.openObjectImpl1(FileObjectDatabase.java:172)
    at org.eclipse.jgit.storage.file.FileObjectDatabase.openObject(FileObjectDatabase.java:157)
    at org.eclipse.jgit.storage.file.WindowCursor.open(WindowCursor.java:122)
    at org.eclipse.jgit.revwalk.RevWalk.getCachedBytes(RevWalk.java:856)
    at org.eclipse.jgit.revwalk.RevCommit.parseHeaders(RevCommit.java:136)
    at org.eclipse.jgit.revwalk.RevWalk.parseHeaders(RevWalk.java:965)
    at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:814)
    at org.eclipse.jgit.revwalk.RevWalk.parseCommit(RevWalk.java:725)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:260)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)
    at com.microsoft.gittf.core.util.CommitWalker.detectAutoSquashedPath(CommitWalker.java:286)

最后两行一遍又一遍地持续了很长时间。

最佳答案

我在 codeplex.com 上收到了回复解决这个问题。这是我得到的答案:

你好,

您看到这个问题是因为您正在尝试 checkin 一个巨大的提交树,其中的提交深度可能超过 2000 - 3000 次。我们的代码有一些递归逻辑来识别要 checkin 的提交。这种逻辑因为它本质上是递归的,所以将 JVM 调用堆栈大小推到 1800 标记以上,这是 JVM 使用的默认限制附近,高于该值JVM 将抛出您所看到的 StackOverFlowException。这是一个 JVM 限制,幸运的是,有一个解决方法可以使用参数扩展堆栈大小来克服此错误。

您需要更新 git-tf 部署目录中的 git-tf.cmd(如果未在 Windows 中运行则为 git-tf)并将 –Xss3m 附加到对“java.exe”的调用。

我们有一个用户故事,可以在未来改善这种情况。

谢谢, 友花

这是答案的链接:http://gittf.codeplex.com/workitem/43

关于线程 "main"java.lang.StackOverflowError 中的 git-tf checkin 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13075221/

相关文章:

带有用户名和密码的 c# VssBasicCredential

visual-studio-2010 - 是否有 TFS checkin 策略来防止跨团队项目 checkin ?

Git tf checkin --deep 命令无法按要求工作

Git - 使用rebase将公共(public)分支 merge 到master

git - 如何正确使用mvn release :prepare?

git - Ubuntu 16.04 的 Source Tree 的替代品是什么?

tfs - git-tf 如何避免每次 checkin 时都指定我的凭据

git - GitHub 中的比较工具(比较发行版,或在必要时比较 shas)

TFS 2010 : history lost after moving a folder

git-tf - 为 git-tf 缓存 TFS 登录凭据