Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] How to provide IndexChangedEvent?

The old GitIndex fired an IndexChangedEvent event. This event is needed to react on index changes to update the UI.
The DirCache implementation does not provide the event (it even does not know Repository!)
Is it possible to extend DirCache to provide the IndexChangedEvent?

Currenty we only get IndexChangedEvents in EGit because RepositoryChangeScanner calls 
Repository.scanForRepoChanges and scanForRepoChanges uses GitIndex.rereadIfNecessary!

	public void scanForRepoChanges() throws IOException {
		getAllRefs(); // This will look for changes to refs
		if (!isBare())
			getIndex(); // This will detect changes in the index
	}

--Jens



Back to the top