【问题标题】:git-tf checkin Exception in thread "main" java.lang.StackOverflowError线程“主”java.lang.StackOverflowError 中的 git-tf checkin 异常
【发布时间】:2012-10-16 00:40:35
【问题描述】:

我正在尝试获取一个现有的 git 存储库并使用 git-tf 将其签入到 TFS 预览中,当我尝试签入时遇到错误。这是我到目前为止所做的。

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

  2. cd 到代码的本地路径。

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

  4. git tf 签入 然后,我收到以下错误:

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

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

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

  3. 再次尝试签入: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)

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

【问题讨论】:

    标签: git tfs git-tf


    【解决方案1】:

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

    你好,

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

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

    我们有一个用户故事可以让这个场景在未来变得更好。

    谢谢, 优花娜

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

    【讨论】:

    • 这个问题在 4 年后仍然出现,是否已得到适当的修复??
    • 对我来说,在解决这个问题后,我得到了一个 'java.lang.OutOfMemoryError: Java heap space' - 很快就用'-Xmx2048m' 解决了:)
    猜你喜欢
    • 2012-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-18
    • 1970-01-01
    相关资源
    最近更新 更多