List<VcsException> (@NotNull GitRepository repository, @NotNull Collection<? extends CommitChange> changes, @NotNull @NonNls String message, @NotNull CommitContext commitContext) { List<VcsException> exceptions = new ArrayList<>(); VirtualFile root = repository.getRoot(); try { // Stage partial changes Pair<List<PartialCommitHelper>, List<CommitChange>> partialAddResult = addPartialChangesToIndex(repository, changes); List<PartialCommitHelper> partialCommitHelpers = partialAddResult.first; Set<CommitChange> changedWithIndex = new HashSet<>(partialAddResult.second); // Stage case-only renames List<CommitChange> caseOnlyRenameChanges = addCaseOnlyRenamesToIndex(repository, changes, changedWithIndex, exceptions); if (!exceptions.isEmpty()) return exceptions; changedWithIndex.addAll(caseOnlyRenameChanges); runWithMessageFile(myProject, root, message, messageFile -> exceptions.addAll(commitUsingIndex(myProject, repository, changes, changedWithIndex, messageFile, createCommitOptions()))); if (!exceptions.isEmpty()) return exceptions; applyPartialChanges(partialCommitHelpers); getRepositoryManager(myProject).updateRepository(root); if (isSubmodule(repository)) { VcsDirtyScopeManager.getInstance(myProject).dirDirtyRecursively(repository.getRoot().getParent()); } GitPostCommitChangeConverter.markRepositoryCommit(commitContext, repository); } catch (VcsException e) { exceptions.add(e); } return exceptions; }