void () { if (getRepositories().size() == 1) { GitRepository repository = myRepositories.iterator().next(); String currentHead = myCurrentHeads.get(repository); if (currentHead != null) { mySettings.setRecentBranchOfRepository(repository.getRoot().getPath(), currentHead); } else { LOG.error("Current head is not known for " + repository.getRoot().getPath()); } } else { String recentCommonBranch = getRecentCommonBranch(); if (recentCommonBranch != null) { mySettings.setRecentCommonBranch(recentCommonBranch); } } }