Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339831 - Get error in infinite loop:"Repository change scanner" has encountered a problem. Unknown index version (or corrupt index): 3
Summary: Get error in infinite loop:"Repository change scanner" has encountered a prob...
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-13 15:16 EDT by naja melan CLA
Modified: 2012-04-19 03:18 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description naja melan CLA 2011-03-13 15:16:51 EDT
Build Identifier: M20110210-1200

I have egit installed as well as git extensions. Usually they do fine intermixing. I add stuff with egit, but alwasy commit using gitextensions.

Now I opened one of my projects in Qt Creator and that also adds files to the repository. When switching back to eclipse I get this error in an infinite loop. Fortunately the dialog is not modal. 

This stopped when I committed with git extensions.

Checking for corruption with git only showed a few dangling blobs...

This is the stack trace:


An error has occured while scanning for changes

org.eclipse.jgit.errors.CorruptObjectException: Unknown index version (or corrupt index): 3
at org.eclipse.jgit.lib.GitIndex$Header.read(GitIndex.java:854)
at org.eclipse.jgit.lib.GitIndex$Header.<init>(GitIndex.java:843)
at org.eclipse.jgit.lib.GitIndex.read(GitIndex.java:247)
at org.eclipse.jgit.lib.GitIndex.rereadIfNecessary(GitIndex.java:159)
at org.eclipse.jgit.lib.Repository.getIndex(Repository.java:871)
at org.eclipse.jgit.storage.file.FileRepository.scanForRepoChanges(FileRepository.java:381)
at org.eclipse.egit.ui.Activator$RepositoryChangeScanner.run(Activator.java:438)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)




Reproducible: Didn't try
Comment 1 Shawn Pearce CLA 2011-03-14 11:55:26 EDT
This won't be fixed until the deprecated GitIndex class dies. :-(
Comment 2 Jan Koops CLA 2011-04-18 10:20:52 EDT
I've got this issue when enabling git sparse checkouts.
Comment 3 Neil Swingler CLA 2011-06-18 03:41:32 EDT
I would also like to be able to use sparse checkouts
Comment 4 Jan Koops CLA 2011-11-16 03:25:52 EST
With http://egit.eclipse.org/r/#change,4355 applied, for me this exception is gone.

Though not visible in egit, it now seems to work with sparse checkouts.
Comment 5 Matthias Sohn CLA 2012-04-19 03:18:40 EDT
this can't occur anymore in current JGit since GitIndex was completely replaced by DirCache which should handle this correctly