diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2022-02-06 08:11:09 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2022-02-07 12:56:40 +0000 |
commit | be1f89c93c00121c071b1ad01a7e1c9971c2f7b5 (patch) | |
tree | c1cdaea823b2b3ccf35d31fdb84e2ffe29e6c574 /src/plugins/diffeditor/diffeditorplugin.cpp | |
parent | 9f7c822197ba2c9f52cfe71dd175c7fea4b1740b (diff) | |
download | qt-creator-be1f89c93c00121c071b1ad01a7e1c9971c2f7b5.tar.gz |
DiffEditor: Fix git diff parsing for rename + mode change
Sample output:
diff --git a/projects/cosign/build.sh b/projects/argo/build.sh
old mode 100755
new mode 100644
similarity index 88%
rename from projects/cosign/build.sh
rename to projects/argo/build.sh
index 87d865d2..14b8885c
--- a/projects/cosign/build.sh
+++ b/projects/argo/build.sh
@@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
+$SRC/cncf-fuzzing/projects/argo/build.sh
+
-compile_go_fuzzer github.com/sigstore/cosign/test FuzzGetPassword fuzz_getPassword gofuzz
Change-Id: Ifa66dfdb80b309d72f524f15c681823ab7e133ba
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/diffeditor/diffeditorplugin.cpp')
-rw-r--r-- | src/plugins/diffeditor/diffeditorplugin.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index 90cdb05422..fc607535af 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -1342,6 +1342,26 @@ void DiffEditor::Internal::DiffEditorPlugin::testReadPatch_data() QTest::newRow("Mode change") << patch << fileDataList9; ////////////// + patch = R"(diff --git a/old.sh b/new.sh +old mode 100644 +new mode 100755 +similarity index 100% +rename from old.sh +rename to new.sh +)" + ; + + fileData1 = FileData(); + fileData1.leftFileInfo = DiffFileInfo("old.sh"); + fileData1.rightFileInfo = DiffFileInfo("new.sh"); + fileData1.fileOperation = FileData::RenameFile; + + QList<FileData> fileDataList10; + fileDataList10 << fileData1; + + QTest::newRow("Mode change + rename") << patch << fileDataList10; + + ////////////// // Subversion New patch = "Index: src/plugins/subversion/subversioneditor.cpp\n" |