Commit a48b5718 authored by Andreas Pakulat's avatar Andreas Pakulat
Browse files

Revert "Revert "Never try to run a DVcsJob on a non-existing folder/file.""

This reverts commit 98a6aafe.

Turns out that the assert was justified, doing a revision graph on a
file simply hangs kdevelop. I first thought thats just because of the
repository size, but on a small repo it hangs too. So bring back the
assert which at least shows something is wrong in the code creating the
job.

This mess that some call git support desperately needs proper design.
parent 98a6aafe
......@@ -282,6 +282,9 @@ bool GitPlugin::isValidDirectory(const KUrl & dirPath)
bool GitPlugin::isVersionControlled(const KUrl &path)
{
QFileInfo fsObject(path.toLocalFile());
if (!fsObject.exists()) {
return false;
}
if (fsObject.isDir()) {
return isValidDirectory(path);
}
......
......@@ -64,6 +64,7 @@ struct DVcsJobPrivate
DVcsJob::DVcsJob(const QDir& workingDir, IPlugin* parent, OutputJob::OutputJobVerbosity verbosity)
: VcsJob(parent, verbosity), d(new DVcsJobPrivate)
{
Q_ASSERT(workingDir.exists());
d->status = JobNotStarted;
d->vcsplugin = parent;
d->childproc->setWorkingDirectory(workingDir.absolutePath());
......
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