From de7704a1b17cfbdf1fbafe1b8dad89337069095e Mon Sep 17 00:00:00 2001 From: Yann Salmon Date: Mon, 1 Apr 2024 16:52:02 +0200 Subject: [PATCH] fix cdUp logic --- src/git/Repository.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/git/Repository.cpp b/src/git/Repository.cpp index 8c639fe9f..d7f91016f 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