3

I am trying to take an existing git repository and check it in to TFS Preview using git-tf, and I am getting an error when I try to do the check in. Here is what I have done so far.

  1. git clone -b https://github.com/.git to clone the branch that I want to check in. I want to check in a branch that isn't named master into TFS.

  2. cd into local path of code.

  3. git tf configure https://.tfspreview.com/DefaultCollection $/ Then, I configured git tf to configure the TFS connection.

  4. git tf checkin Then, I got the following error:

Checking in to $/: 0% git-tf: no HEAD ref

  1. So I then created a master branch since I didn't have one by doing the following: git branch -b master

  2. Switched back to the branch I checked out: git checkout .

  3. Tried the check in again: git tf checkin.

  4. That got me past the first error. However, I got the following error, and I am not sure what to do about this.

Does anyone have any ideas on how to get past the error below from running git tf checkin?

Thanks!

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)

The last two lines continues over and over again for a long time.

4

1 回答 1

2

我在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

于 2012-10-26T21:47:30.227 回答