Merge pull request #732 from ysalmon/gitdirfix

fix cdUp logic
This commit is contained in:
Murmele 2024-04-20 16:22:57 +02:00 committed by GitHub
commit 05deb976fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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