Community
Participate
Working Groups
I found this stacktrace in my console using egit 97154e8 and jgit 629fd0d : java.io.IOException: Unknown repository format "null"; expected "0". at org.eclipse.jgit.lib.Repository.<init>(Repository.java:297) at org.eclipse.jgit.lib.Repository.<init>(Repository.java:190) at org.eclipse.jgit.lib.Repository.<init>(Repository.java:138) at org.eclipse.egit.core.RepositoryCache.lookupRepository(RepositoryCache.java:51) at org.eclipse.egit.ui.internal.repository.RepositoriesView$6.run(RepositoriesView.java:393) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
I also have this exception. The reason was that my config file in the .git folder was suddenly empty. JGit expects a key core.repositoryformatversion=0 in the config file. Maybe one could present a better error message, or even repair the config file in such a case?
I haven't seen this in quite some time now. If the problem is caused by a "disappearing" config file, we shouldn't hide this Exception anyway. Should this comes up again, let's reopen this bug.
fixed with http://egit.eclipse.org/r/#change,2474 merged as 84d9259d621842a36d3bc0c583cd43b0bcbd6fe3
I just had the same problem using Eclipse JGit 1.0.0.201106090707-r I edited my repository using gitk (I only created a new branch in "Repository->Visualize All Branch History") while Eclipse was running in the background. After that my repository simply disappeared from the RepositoriesView. The Eclipse error log contained the entry below. The config file in the .git folder was empty (same as for Stefan). An Exception occurred while looking up the Repository path "C:\Some\Path\.git"; it will be removed from the Git Repositories View java.io.IOException: Unknown repository format "null"; expected "0". at org.eclipse.jgit.storage.file.FileRepository.<init>(FileRepository.java:185) at org.eclipse.jgit.storage.file.FileRepository.<init>(FileRepository.java:128) at org.eclipse.egit.core.RepositoryCache.lookupRepository(RepositoryCache.java:52) at org.eclipse.egit.ui.internal.repository.RepositoriesView.initRepositoriesAndListeners(RepositoriesView.java:279) at org.eclipse.egit.ui.internal.repository.RepositoriesView.access$6(RepositoriesView.java:271) at org.eclipse.egit.ui.internal.repository.RepositoriesView$8.run(RepositoriesView.java:439) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Seems this is back...
I get this error after starting using a org.eclipse.egit.core.RepositoryCache. Our code never delete repositories, so IMHO bug is somewhere in RepositoryCache.
I've not seen this in a long time, please reopen in case this happens again.