@NotNull
  SmartList<VcsRef> refsToCommit(int index) {
    SmartList<VcsRef> result = new SmartList<>();
    if (myBranches.containsKey(index)) result.addAll(myBranches.get(index));
    IntList tags = myTags.get(index);
    if (tags != null) {
      tags.forEach(tag -> {
        VcsRef ref = myStorage.getVcsRef(tag);
        if (ref != null) {
          result.add(ref);
        }
        else {
          LOG.error("Could not find a tag by id " + tag + " at commit " + myStorage.getCommitId(index));
        }
      });
    }
    return result;
  }
@NotNull
  SmartList<VcsRef> refsToCommit(int index)