Commit 34a452a1 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Looks like making the paths relative wasn't needed afterall.

parent 0bd19277
......@@ -24,18 +24,5 @@
#include <kdebug.h>
GitJob::GitJob(const QDir& workingDir, KDevelop::IPlugin* parent, KDevelop::OutputJob::OutputJobVerbosity verbosity)
: DVcsJob(workingDir, parent, verbosity), m_baseDir(workingDir.absolutePath())
{
m_baseDir.adjustPath(KUrl::AddTrailingSlash);
}
KDevelop::DVcsJob& GitJob::operator<<(const KUrl& url)
{
QString res = KUrl::relativeUrl(m_baseDir, url);
if(res == "./")
res = '.';
kDebug() << "old url" << url << "relative:" << res << "base dir:" << m_baseDir;
return DVcsJob::operator<<(res);
}
: DVcsJob(workingDir, parent, verbosity)
{}
......@@ -30,10 +30,6 @@ class GitJob : public KDevelop::DVcsJob
public:
GitJob(const QDir& workingDir, KDevelop::IPlugin* parent = 0, KDevelop::OutputJob::OutputJobVerbosity verbosity = KDevelop::OutputJob::Verbose);
///Make paths relative to the current directory
virtual KDevelop::DVcsJob& operator<<(const KUrl& arg);
private:
KUrl m_baseDir;
};
#endif // GITJOB_H
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