Skip to content

Commit

Permalink
Merge pull request #732 from ysalmon/gitdirfix
Browse files Browse the repository at this point in the history
fix cdUp logic
  • Loading branch information
Murmele authored Apr 20, 2024
2 parents ef6984c + de7704a commit 05deb97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/git/Repository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 05deb97

Please sign in to comment.