IDEA 2020 GitRepositoryNotFoundException

 

阅读源码你会发现,在升级 IDEA2019、2020后针对文件对比,IDEA 针对忽略的文件不再进行对比。从 idea log

你会发现 抛出了 GitRepositoryNotFoundException。

git4idea.GitUtil$GitRepositoryNotFoundException: Can't find configured git repository for /Users *****
    at git4idea.GitUtil.getRootForFile(GitUtil.java:681)
    at git4idea.GitContentRevision.loadContent(GitContentRevision.java:74)
    at com.intellij.openapi.vcs.impl.ContentRevisionCache.getOrLoadAsBytes(ContentRevisionCache.java:200)
    at git4idea.GitContentRevision.getContentAsBytes(GitContentRevision.java:66)
    at com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer.createContent(ChangeDiffRequestProducer.java:425)
    at com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer.createSimpleRequest(ChangeDiffRequestProducer.java:349)
    at com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer.createRequest(ChangeDiffRequestProducer.java:278)
    at com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer.loadCurrentContents(ChangeDiffRequestProducer.java:239)
    at com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer.process(ChangeDiffRequestProducer.java:201)
    at com.intellij.diff.impl.CacheDiffRequestProcessor$Simple.loadRequest(CacheDiffRequestProcessor.java:206)
    at com.intellij.diff.impl.CacheDiffRequestProcessor$Simple.loadRequest(CacheDiffRequestProcessor.java:183)

异常源码:

 决策代码:

需要你检查:file Types 或略的文件,与你代码路径是否冲突。

PS:idea git plus 源码:

https://github.com/JetBrains/intellij-community/blob/master/plugins/git4idea/src/git4idea/GitUtil.java

展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读