protege icon indicating copy to clipboard operation
protege copied to clipboard

Problem with Git folder: Caused by: org.eclipse.jgit.errors.CorruptObjectException: Unknown DIRC version 4

Open SimonBin opened this issue 2 years ago • 1 comments

  ERROR  18:02:36  [GitRepo] An error occurred: Unknown DIRC version 4
org.eclipse.jgit.api.errors.JGitInternalException: Unknown DIRC version 4
	at org.eclipse.jgit.api.StatusCommand.call(StatusCommand.java:161) ~[na:na]
	at org.protege.editor.owl.model.git.GitRepositoryManager.getModifiedOntologyDocumentPaths(GitRepositoryManager.java:168) ~[na:na]
	at org.protege.editor.owl.model.git.GitRepositoryManager.isAnyOntologyDocumentModified(GitRepositoryManager.java:153) ~[na:na]
	at org.protege.editor.owl.model.git.GitRepoStatusPresenter.updateStatusView(GitRepoStatusPresenter.java:76) ~[na:na]
	at org.protege.editor.owl.model.git.GitRepoStatusPresenter.handleModelManagerEvent(GitRepoStatusPresenter.java:58) ~[na:na]
	at org.protege.editor.owl.model.OWLModelManagerImpl.lambda$fireEvent$1(OWLModelManagerImpl.java:196) ~[na:na]

SimonBin avatar Feb 21 '23 17:02 SimonBin

It seems the version of org.eclipse.jgit that Protégé is using (4.8.0) does not support Git’s index format v4. This support was added in JGit 5.9.0, so I guess we need to update our dependency to at least that version.

In the meantime, a workaround is to have Git rewrite its index using the v2 or v3 format, with

$ git update-index --index-version 3

(This may decrease Git’s performances, as the main advantage of format v4 is a smaller index allowing for faster loading.)

gouttegd avatar Mar 23 '23 13:03 gouttegd