void (List<? extends Change> textChanges, CommitContext commitContext) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(myProject); if (dvcsUsedInProject() && VcsConfiguration.getInstance(myProject).INCLUDE_TEXT_INTO_SHELF) { Map<FilePath, ContentRevision> toKeep = new HashMap<>(); for (Change change : textChanges) { if (change.getBeforeRevision() == null || change.getAfterRevision() == null) continue; if (isBig(change)) continue; FilePath filePath = change.getBeforeRevision().getFile(); AbstractVcs vcs = vcsManager.getVcsFor(filePath); if (vcs != null && VcsType.distributed.equals(vcs.getType())) { toKeep.put(filePath, change.getBeforeRevision()); } } commitContext.putUserData(BaseRevisionTextPatchEP.ourBaseRevisions, toKeep); } }