void (@NotNull List<VcsRef> references) { if (myReferences.equals(references)) return; myReferences = references; List<VcsRef> visibleReferences = (myRefsLimit > 0) ? ContainerUtil.getFirstItems(myReferences, myRefsLimit) : myReferences; myGroupedVisibleReferences = ContainerUtil.groupBy(visibleReferences, VcsRef::getType); update(); }