From: Thomas Zander Date: Wed, 22 Jul 2009 16:40:05 +0000 (+0300) Subject: Fix reading a diff in 'whatsnew' X-Git-Url: https://repo.or.cz/w/vng.git/commitdiff_plain/77191b5264c9cc4636803d2f85833067d61058cf Fix reading a diff in 'whatsnew' --- diff --git a/src/hunks/ChangeSet.cpp b/src/hunks/ChangeSet.cpp index 4eb89be..404aebf 100644 --- a/src/hunks/ChangeSet.cpp +++ b/src/hunks/ChangeSet.cpp @@ -386,7 +386,7 @@ QList 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('"');