MCPcopy Create free account
hub / github.com/KDE/kdevelop / isVersionControlled

Method isVersionControlled

plugins/git/gitplugin.cpp:350–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350bool GitPlugin::isVersionControlled(const QUrl &path)
351{
352 QFileInfo fsObject(path.toLocalFile());
353 if (!fsObject.exists()) {
354 return false;
355 }
356 if (fsObject.isDir()) {
357 return isValidDirectory(path);
358 }
359
360 QString filename = fsObject.fileName();
361
362 QStringList otherFiles = getLsFiles(fsObject.dir(), QStringList(QStringLiteral("--")) << filename, KDevelop::OutputJob::Silent);
363 return !otherFiles.empty();
364}
365
366VcsJob* GitPlugin::init(const QUrl &directory)
367{

Callers 6

removeUrlMethod · 0.45
renameUrlMethod · 0.45
copyUrlMethod · 0.45
changesMethod · 0.45
createMenuMethod · 0.45

Calls 5

QStringListClass · 0.85
toLocalFileMethod · 0.80
existsMethod · 0.80
emptyMethod · 0.80
fileNameMethod · 0.45

Tested by

no test coverage detected