Fix reading a diff in 'whatsnew'
authorThomas Zander <thomas.zander@trolltech.com>
Wed, 22 Jul 2009 16:40:05 +0000 (22 19:40 +0300)
committerThomas Zander <thomas.zander@trolltech.com>
Wed, 22 Jul 2009 16:40:05 +0000 (22 19:40 +0300)
src/hunks/ChangeSet.cpp

index 4eb89be..404aebf 100644 (file)
@@ -386,7 +386,7 @@ QList<File> ChangeSet::readGitDiff(QIODevice &git, File *fileToDiff)
         const bool newfile = line.startsWith("--- /dev/null");
         if (line.length() > 6 && (newfile || line.startsWith("--- a/")
             || line.startsWith("--- \"a/"))) {
-            if (!newfile) {
+            if (!newfile && fileToDiff == 0) {
                 if (line[4].unicode() == '"') { // git-encoding...
                     QByteArray array(buf + 7, strlen(buf) - 8);
                     array.prepend('"');