Patch Set 3:

I detected another problem: 
ResourceRefreshJob.onIndexChanged also reacts on changes that were triggered inside Eclipse, e.g. on committing.
This produces unneccesary refreshes. Only changes detected while scanForRepoChanges() is running should be taken into account.

Thread [Worker-1] (Suspended (breakpoint at line 311 in org.eclipse.egit.ui.Activator$ResourceRefreshJob))	
	org.eclipse.egit.ui.Activator$ResourceRefreshJob.onIndexChanged(org.eclipse.jgit.events.IndexChangedEvent) line: 311	
	org.eclipse.jgit.events.IndexChangedEvent.dispatch(org.eclipse.jgit.events.IndexChangedListener) line: 55	
	org.eclipse.jgit.events.IndexChangedEvent.dispatch(org.eclipse.jgit.events.RepositoryListener) line: 1	
	org.eclipse.jgit.events.ListenerList.dispatch(org.eclipse.jgit.events.RepositoryEvent) line: 120	
	org.eclipse.jgit.storage.file.FileRepository(org.eclipse.jgit.lib.Repository).fireEvent(org.eclipse.jgit.events.RepositoryEvent<?>) line: 145	
	org.eclipse.jgit.lib.GitIndex.write() line: 333	
	org.eclipse.egit.core.op.CommitOperation.doCommits(java.lang.String, java.util.HashMap<org.eclipse.jgit.lib.Repository,org.eclipse.jgit.lib.Tree>) line: 292	
	org.eclipse.egit.core.op.CommitOperation.access$8(org.eclipse.egit.core.op.CommitOperation, java.lang.String, java.util.HashMap) line: 279	
	org.eclipse.egit.core.op.CommitOperation$1.run(org.eclipse.core.runtime.IProgressMonitor) line: 176	
	org.eclipse.core.internal.resources.Workspace.run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.jobs.ISchedulingRule, int, org.eclipse.core.runtime.IProgressMonitor) line: 1975	
	org.eclipse.core.internal.resources.Workspace.run(org.eclipse.core.resources.IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor) line: 1957	
	org.eclipse.egit.core.op.CommitOperation.execute(org.eclipse.core.runtime.IProgressMonitor) line: 190	
	org.eclipse.egit.ui.internal.actions.CommitActionHandler$1.run(org.eclipse.core.runtime.IProgressMonitor) line: 186	
	org.eclipse.core.internal.jobs.Worker.run() line: 54