List<VcsFileRevision> (@NotNull BlockData blockData) { ArrayList<VcsFileRevision> result = new ArrayList<>(); BlockData data = myBlockLoader.getLoadedData(); for (int i = 1; i < blockData.getRevisions().size(); i++) { Block block1 = data.getBlock(i - 1); Block block2 = data.getBlock(i); if (block1 == null || block2 == null) break; if (!block1.getLines().equals(block2.getLines())) { result.add(blockData.getRevisions().get(i - 1)); } if (block2 == EMPTY_BLOCK) break; } int initialCommit = blockData.getRevisions().size() - 1; Block initialCommitBlock = data.getBlock(initialCommit); if (initialCommitBlock != null && initialCommitBlock != EMPTY_BLOCK) { result.add(blockData.getRevisions().get(initialCommit)); } return result; }