Skip to content

Commit d4b532e

Browse files
committed
Make external diff command work again
.. by fixing SHA1 inspection in method copyFileToDiffIfNeeded where any SHA1 matched regex pattern "0*". That led the external diff feature to always compare the working directory state of a file against itself rather than comparing the version from a given commit against the version from the commit' parent. Regression from commit 1cb9acf
1 parent 827615d commit d4b532e

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

src/mainimpl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,8 @@ void MainImpl::ActExternalDiff_activated() {
291291
}
292292
}
293293

294-
const QRegularExpression MainImpl::emptySha("0*");
295-
296294
QString MainImpl::copyFileToDiffIfNeeded(QStringList* filenames, QString sha) {
297-
if (emptySha.match(sha).hasMatch())
295+
if (sha == QGit::ZERO_SHA)
298296
{
299297
return QString(curDir + "/" + rv->st.fileName());
300298
}

src/mainimpl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ protected slots:
187187
QString textToFind;
188188
QRegularExpression shortLogRE;
189189
QRegularExpression longLogRE;
190-
static const QRegularExpression emptySha;
191190
QMap<QString, QVariant> revision_variables; // variables used in generic input dialogs
192191
bool setRepositoryBusy;
193192

0 commit comments

Comments
 (0)