| 1182 | } |
| 1183 | |
| 1184 | static QString commitInfoFromDiff(const QByteArray &raw) |
| 1185 | { |
| 1186 | if (!raw.startsWith("commit ")) { |
| 1187 | return {}; |
| 1188 | } |
| 1189 | int commitEnd = raw.indexOf("diff --git"); |
| 1190 | if (commitEnd == -1) { |
| 1191 | return {}; |
| 1192 | } |
| 1193 | return QString::fromUtf8(raw.mid(0, commitEnd).trimmed()); |
| 1194 | } |
| 1195 | |
| 1196 | void DiffWidget::openDiff(const QByteArray &raw) |
| 1197 | { |