MCPcopy Create free account
hub / github.com/KDE/kate / commitInfoFromDiff

Function commitInfoFromDiff

apps/lib/diff/diffwidget.cpp:1184–1194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1182}
1183
1184static 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
1196void DiffWidget::openDiff(const QByteArray &raw)
1197{

Callers 1

openDiffMethod · 0.85

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected