void (@NotNull Set<? super VcsRef> allRefs, @NotNull Set<String> currentTags, @NotNull Collection<? extends VcsRef> previousRefs) { for (VcsRef ref : previousRefs) { if (!allRefs.contains(ref) && currentTags.contains(ref.getName())) { allRefs.add(ref); } } }