我正在尝试使用现有的git存储库并使用git-tf将其检入TFS预览版,当我尝试检入时出现错误。这是我到目前为止所做的。
git clone -b https://github.com/。git克隆我要签入的分支。我想检查一个未命名为master的分支到TFS。
cd进入本地代码路径。
git tf configure https://.tfspreview.com/DefaultCollection $ /然后,我配置了git tf来配置TFS连接。
git tf checkin 然后,我收到以下错误:
签到$ /:0% git-tf:没有HEAD参考
所以我创建了一个主分支,因为我没有通过执行以下操作来创建主分支:git branch -b master
切换回我检查过的分支:git checkout。
再次尝试检查:git tf checkin。
这让我超越了第一个错误。但是,我收到了以下错误,我不知道该怎么做。
有没有人对如何通过运行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)
最后两行持续了很长时间。
答案 0 :(得分:2)
我在codeplex.com上得到了回复,解决了这个问题。这是我得到的答案:
你好,
您正在看到此问题,因为您正在尝试签入一个可能超过2000 - 3000次提交的巨大提交树。我们的代码有一些递归逻辑来识别要检入的提交。这个逻辑因为它本质上是递归的,将JVM调用堆栈大小推到1800以上,这大约是JVM使用的默认限制,高于那里JVM将抛出您正在看到的StackOverFlowException。这是一个JVM限制,幸运的是有一种解决方法可以使用参数扩展堆栈大小以克服此错误。
您需要在git-tf部署目录中更新git-tf.cmd(git-tf,如果没有在windows中运行),并将-Xss3m附加到对“java.exe”的调用中。
我们有一个用户故事,可以在将来改善这种情况。
谢谢, Youhana