int (@NotNull VcsRef ref1, @NotNull VcsRef ref2) { VcsLogProvider provider1 = myProviders.get(ref1.getRoot()); VcsLogProvider provider2 = myProviders.get(ref2.getRoot()); if (provider1 == null) return provider2 == null ? ref1.getName().compareTo(ref2.getName()) : 1; if (provider2 == null) return -1; if (provider1 == provider2) { return provider1.getReferenceManager().getLabelsOrderComparator().compare(ref1, ref2); } return provider1.getSupportedVcs().getName().compareTo(provider2.getSupportedVcs().getName()); }