void (@NotNull FilePatch patch, @NotNull GitPatchParser.PatchInfo patchInfo) { if (patch instanceof TextFilePatch) ((TextFilePatch)patch).setFileStatus(patchInfo.myFileStatus); // 'patch.getBeforeName() | getAfterName()' values pre-filled from '--- a/1.txt | +++ b/1.txt' lines if (patch.getBeforeName() == null || patchInfo.myPreferPatchInfoPaths) patch.setBeforeName(patchInfo.myBeforeName); if (patch.getAfterName() == null || patchInfo.myPreferPatchInfoPaths) patch.setAfterName(patchInfo.myAfterName); //remember sha-1 as version ids or set null if no info patch.setBeforeVersionId(patchInfo.myBeforeIndex); patch.setAfterVersionId(patchInfo.myAfterIndex); //set new file mode patch.setNewFileMode(patchInfo.myNewFileMode); }