Kotlin 带jgit的缺失blob

Kotlin 带jgit的缺失blob,kotlin,jgit,Kotlin,Jgit,我正在使用jgit尝试以下操作: val git = Git.open(File("/path/toMyRepo")) val diffFormatter = DiffFormatter(DisabledOutputStream.INSTANCE).apply { setRepository(git.repository) } git.diff().call().forEach { if (it.changeType == DiffEntry.ChangeType.MO

我正在使用jgit尝试以下操作:

val git = Git.open(File("/path/toMyRepo"))
val diffFormatter = DiffFormatter(DisabledOutputStream.INSTANCE).apply {
        setRepository(git.repository)
}

git.diff().call().forEach {
    if (it.changeType == DiffEntry.ChangeType.MODIFY) {
       diffFormatter.toFileHeader(it).toEditList().forEach {
            println(it)
       }
    }
}
但我得到了以下例外情况的答复:

    "org.eclipse.jgit.errors.MissingObjectException: Missing blob 9645ba8461cd88af20fd66a3e44055deb24f826e"
有人看到代码有什么问题吗

编辑:完全stacktrace,带有一个非常空的repo(只有一个提交,并且在唯一文件的唯一行上有一个更改):


异常发生在哪里?请提供完整的stacktrace。现在提供完整的stacktraceSounds就像不一致的Git存储库一样。如果使用普通的Git二进制文件运行类似的操作,会发生什么?如果可以的话,我会在Eclipse的JGit上报告一个bug。orgI创建了一个非常空的新git回购。不要认为这是一个不合适的存储库
Exception in thread "main" org.eclipse.jgit.errors.MissingObjectException: Missing blob f7891cbde46bbb6ca96065ecf1900ef6a223f679
    at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:149)
    at org.eclipse.jgit.diff.ContentSource$ObjectReaderSource.open(ContentSource.java:140)
    at org.eclipse.jgit.diff.ContentSource$Pair.open(ContentSource.java:276)
    at org.eclipse.jgit.diff.DiffFormatter.open(DiffFormatter.java:1020)
    at org.eclipse.jgit.diff.DiffFormatter.createFormatResult(DiffFormatter.java:950)
    at org.eclipse.jgit.diff.DiffFormatter.toFileHeader(DiffFormatter.java:915)
    at MainKt.main(Main.kt:17)