diff --git a/src/git/Repository.cpp b/src/git/Repository.cpp index 8c639fe9..d7f91016 100644 --- a/src/git/Repository.cpp +++ b/src/git/Repository.cpp @@ -154,8 +154,7 @@ Repository::operator git_repository *() const { return d->repo; } QDir Repository::dir(bool includeGitFolder) const { QDir dir(git_repository_path(d->repo)); - if (!includeGitFolder) { - assert(dir.dirName() == ".git"); + if (!includeGitFolder && dir.dirName() == ".git") { if (!dir.cdUp()) { assert(false); // must be done explicit, because in release build the // assert will not be executed, so assert(dir.cdUp()) does