Changeset View
Changeset View
Standalone View
Standalone View
plugins/git/gitplugin.cpp
Context not available. | |||||
391 | { | 391 | { | ||
---|---|---|---|---|---|
392 | DVcsJob* job = new GitJob(dotGitDirectory(fileOrDirectory), this, KDevelop::OutputJob::Silent); | 392 | DVcsJob* job = new GitJob(dotGitDirectory(fileOrDirectory), this, KDevelop::OutputJob::Silent); | ||
393 | job->setType(VcsJob::Diff); | 393 | job->setType(VcsJob::Diff); | ||
394 | *job << "git" << "diff" << "--no-color" << "--no-ext-diff"; | 394 | *job << "git" << "diff" << "--no-color" << "--no-ext-diff" << "--full-index"; | ||
395 | if (!usePrefix()) { | 395 | if (!usePrefix()) { | ||
396 | // KDE's ReviewBoard now requires p1 patchfiles, so `git diff --no-prefix` to generate p0 patches | 396 | // KDE's ReviewBoard now requires p1 patchfiles, so `git diff --no-prefix` to generate p0 patches | ||
397 | // has become optional. | 397 | // has become optional. | ||
398 | *job << "--no-prefix"; | 398 | *job << "--no-prefix"; | ||
399 | } | 399 | } | ||
400 | if (m_contextLines > 0) { | ||||
401 | *job << QStringLiteral("-U%1").arg(m_contextLines); | ||||
402 | } | ||||
400 | if (dstRevision.revisionType() == VcsRevision::Special && | 403 | if (dstRevision.revisionType() == VcsRevision::Special && | ||
401 | dstRevision.specialType() == VcsRevision::Working) { | 404 | dstRevision.specialType() == VcsRevision::Working) { | ||
402 | if (srcRevision.revisionType() == VcsRevision::Special && | 405 | if (srcRevision.revisionType() == VcsRevision::Special && | ||
Context not available. | |||||
417 | } else { | 420 | } else { | ||
418 | *job << preventRecursion(QList<QUrl>() << fileOrDirectory); | 421 | *job << preventRecursion(QList<QUrl>() << fileOrDirectory); | ||
419 | } | 422 | } | ||
423 | qWarning() << "git diff job:" << job->dvcsCommand(); | ||||
420 | 424 | | |||
421 | connect(job, &DVcsJob::readyForParsing, this, &GitPlugin::parseGitDiffOutput); | 425 | connect(job, &DVcsJob::readyForParsing, this, &GitPlugin::parseGitDiffOutput); | ||
422 | return job; | 426 | return job; | ||
Context not available. |