Skip to content

Commit 55a507a

Browse files
committed
Handle missing git command gracefully by returning empty GitUser instead of asserting
1 parent ab3c2de commit 55a507a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/GitRunner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ void GitRunner::removeFile(const QString &path, bool rm_real_file)
202202

203203
GitUser GitRunner::getUser(GitSource purpose)
204204
{
205-
Q_ASSERT(git);
205+
if (!git) return {}; // gitコマンドが存在しない場合は空のオブジェクトを返し、ASSERTでは落とさない。
206+
// Q_ASSERT(git);
206207
return git->getUser(purpose);
207208
}
208209

0 commit comments

Comments
 (0)