| 43 | }; |
| 44 | |
| 45 | QString 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 | |
| 62 | QString GitClientPrivate::normalLogArguments() |
| 63 | { |
no test coverage detected