// Reset paths, they're from the old repository
resetPathsToExpand();
if (refsChangedListener != null)
refsChangedListener.remove();
refsChangedListener = repository.getListenerList()
.addRefsChangedListener(new RefsChangedListener() {
public void onRefsChanged(RefsChangedEvent event) {
updateRebaseButtonVisibility(repository
.getRepositoryState().isRebasing());
}