DiffEditor: Fix parsing of mode-only change in patch

If one of the files has mode-only change, the entire patch
fails as a git patch, and is parsed as a text patch.

Because of that, the prefixes (a/, b/) are not stripped and
jumping to a change by double-clicking does not work.

Change-Id: Ib54ce4fa7aad02cb956af1f7de73d3c732ac5a89
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Orgad Shaneh
2017-11-26 10:24:32 +02:00
committed by Orgad Shaneh
parent 8bc3ac9177
commit 63861c44c1
3 changed files with 37 additions and 16 deletions

View File

@@ -104,6 +104,7 @@ class DIFFEDITOR_EXPORT FileData {
public:
enum FileOperation {
ChangeFile,
ChangeMode,
NewFile,
DeleteFile,
CopyFile,