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

Method checkRepositoryExist

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

Source from the content-addressed store, hash-verified

217}
218
219bool GitClient::checkRepositoryExist(const QString &filePath, QString *repository)
220{
221 for (const auto &cache : d->gitRepositoryCache) {
222 if (filePath.startsWith(cache)) {
223 if (repository)
224 *repository = cache;
225 return true;
226 }
227 }
228
229 auto ret = d->findRepository(filePath);
230 if (!ret.isEmpty()) {
231 d->gitRepositoryCache << ret;
232 if (repository)
233 *repository = ret;
234 return true;
235 }
236
237 return false;
238}
239
240bool GitClient::setupInstantBlame(const QString &filePath)
241{

Callers 2

setupProjectMenuMethod · 0.80
setupFileMenuMethod · 0.80

Calls 3

startsWithMethod · 0.80
findRepositoryMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected