Commit 7669ce6a authored by Andras Mantia's avatar Andras Mantia Committed by Milian Wolff
Browse files

Follow renames when showing git history.

By default git log (used to get history info in KDevelop) does not
follow the file moves or renames. The patch adds the --follow
argument to the git command to get the complete history.

I got bitten by this, because it was not possible to identify all
committers to a file by using KDevelop.

REVIEW: 109952
parent fe61dcf2
......@@ -489,7 +489,7 @@ VcsJob* GitPlugin::log(const KUrl& localLocation,
{
DVcsJob* job = new GitJob(dotGitDirectory(localLocation), this, KDevelop::OutputJob::Silent);
job->setType(VcsJob::Log);
*job << "git" << "log" << "--date=raw" << "--name-status" << "-M80%";
*job << "git" << "log" << "--date=raw" << "--name-status" << "-M80%" << "--follow";
QString rev = revisionInterval(dst, src);
if(!rev.isEmpty())
*job << rev;
......@@ -503,7 +503,7 @@ VcsJob* GitPlugin::log(const KUrl& localLocation, const KDevelop::VcsRevision& r
{
DVcsJob* job = new GitJob(dotGitDirectory(localLocation), this, KDevelop::OutputJob::Silent);
job->setType(VcsJob::Log);
*job << "git" << "log" << "--date=raw" << "--name-status" << "-M80%";
*job << "git" << "log" << "--date=raw" << "--name-status" << "-M80%" << "--follow";
QString revStr = toRevisionName(rev, QString());
if(!revStr.isEmpty())
*job << revStr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment