From a3d1ef4e89d86b82a523b8cbe71ed13e71bcbe15 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 28 Nov 2022 17:51:15 +0200 Subject: PatchTool: Preserve CRLF when reverting a chunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTCREATORBUG-12690 Change-Id: Ib408a33bd1bd69ebc27a029025313eaf7bdf4f18 Reviewed-by: Jarek Kobus Reviewed-by: André Hartmann --- src/plugins/coreplugin/patchtool.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/coreplugin/patchtool.cpp') diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp index f866647f9c..011f89233c 100644 --- a/src/plugins/coreplugin/patchtool.cpp +++ b/src/plugins/coreplugin/patchtool.cpp @@ -83,8 +83,7 @@ static bool runPatchHelper(const QByteArray &input, const FilePath &workingDirec args << ("-p" + QString::number(strip)); if (patchAction == PatchAction::Revert) args << "-R"; - if (withCrlf) - args << "--binary"; + args << "--binary"; MessageManager::writeDisrupting(Tr::tr("Running in %1: %2 %3") .arg(workingDirectory.toUserOutput(), patch.toUserOutput(), args.join(' '))); patchProcess.setCommand({patch, args}); -- cgit v1.2.1