Commit d9f1a111 authored by Alexander Dymo's avatar Alexander Dymo
Browse files

Fix git plugin to also not show/raise "version control" toolview on context menu activation

parent 6d7b84cd
......@@ -97,7 +97,7 @@ bool GitPlugin::isValidDirectory(const KUrl & dirPath)
}
// We might have found a valid repository, call git to verify it
KDevelop::VcsJob* job = gitRevParse(possibleRepoRoot.toLocalFile(), QStringList(QString("--is-inside-work-tree")));
KDevelop::VcsJob* job = gitRevParse(possibleRepoRoot.toLocalFile(), QStringList(QString("--is-inside-work-tree")), KDevelop::OutputJob::Silent);
if (!job) {
kDebug() << "Failed creating job";
......@@ -129,7 +129,7 @@ bool GitPlugin::isVersionControlled(const KUrl &path)
QStringList listfiles("--");
listfiles.append(filename);
QStringList otherFiles = getLsFiles(workDir, listfiles);
QStringList otherFiles = getLsFiles(workDir, listfiles, KDevelop::OutputJob::Silent);
return !otherFiles.empty();
}
......@@ -364,9 +364,10 @@ VcsJob* GitPlugin::reset(const KUrl& repository, const QStringList &args, const
return NULL;
}
DVcsJob* GitPlugin::lsFiles(const QString &repository, const QStringList &args)
DVcsJob* GitPlugin::lsFiles(const QString &repository, const QStringList &args,
KDevelop::OutputJob::OutputJobVerbosity verbosity)
{
DVcsJob* job = new DVcsJob(this);
DVcsJob* job = new DVcsJob(this, verbosity);
if (prepareJob(job, repository) ) {
*job << "git";
*job << "ls-files";
......@@ -831,9 +832,10 @@ void GitPlugin::parseGitLogOutput(DVcsJob * job)
job->setResults(commits);
}
QStringList GitPlugin::getLsFiles(const QString &directory, const QStringList &args)
QStringList GitPlugin::getLsFiles(const QString &directory, const QStringList &args,
KDevelop::OutputJob::OutputJobVerbosity verbosity)
{
DVcsJob* job = lsFiles(directory, args);
DVcsJob* job = lsFiles(directory, args, verbosity);
if (job)
{
job->exec();
......@@ -845,10 +847,11 @@ QStringList GitPlugin::getLsFiles(const QString &directory, const QStringList &a
return QStringList();
}
DVcsJob* GitPlugin::gitRevParse(const QString &repository, const QStringList &args)
DVcsJob* GitPlugin::gitRevParse(const QString &repository, const QStringList &args,
KDevelop::OutputJob::OutputJobVerbosity verbosity)
{
//Use prepareJob() here only if you like "dead" recursion and KDevelop crashes
DVcsJob* job = new DVcsJob(this);
DVcsJob* job = new DVcsJob(this, verbosity);
if (job)
{
QString workDir = repository;
......
......@@ -26,6 +26,7 @@
#include <vcs/dvcs/dvcsplugin.h>
#include <QObject>
#include <vcs/vcsstatusinfo.h>
#include <outputview/outputjob.h>
namespace KDevelop
......@@ -109,11 +110,13 @@ protected:
bool isValidDirectory(const KUrl &dirPath);
DVcsJob* lsFiles(const QString &repository,
const QStringList &args);
const QStringList &args,
KDevelop::OutputJob::OutputJobVerbosity verbosity = KDevelop::OutputJob::Verbose);
DVcsJob* gitRevList(const QString &repository,
const QStringList &args);
DVcsJob* gitRevParse(const QString &repository,
const QStringList &args);
const QStringList &args,
KDevelop::OutputJob::OutputJobVerbosity verbosity = KDevelop::OutputJob::Verbose);
protected slots:
void parseGitBlameOutput(DVcsJob *job);
......@@ -121,7 +124,8 @@ protected slots:
private:
//commit dialog "main" helper
QStringList getLsFiles(const QString &directory, const QStringList &args = QStringList());
QStringList getLsFiles(const QString &directory, const QStringList &args = QStringList(),
KDevelop::OutputJob::OutputJobVerbosity verbosity = KDevelop::OutputJob::Verbose);
void initBranchHash(const QString &repo);
......
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