MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / findRepository

Method findRepository

src/plugins/git/client/gitclient.cpp:45–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43};
44
45QString GitClientPrivate::findRepository(const QString &filePath)
46{
47 if (filePath == "/" || filePath.isEmpty())
48 return {};
49
50 QFileInfo info(filePath);
51 if (info.isFile())
52 return findRepository(info.absolutePath());
53
54 QDir dir(filePath);
55 auto dirList = dir.entryList(QDir::AllDirs | QDir::Hidden | QDir::NoDotAndDotDot);
56 if (dirList.isEmpty() || !dirList.contains(GitDirectory))
57 return findRepository(info.absolutePath());
58
59 return filePath;
60}
61
62QString GitClientPrivate::normalLogArguments()
63{

Callers 1

checkRepositoryExistMethod · 0.80

Calls 2

isEmptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected