diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp
index f0fd31eb34a09b95cc56d8f4bbe30f7eeb211dc0..a1c54f7700d3f34ebbb04009eb771724063271fb 100644
--- a/src/plugins/git/gitgrep.cpp
+++ b/src/plugins/git/gitgrep.cpp
@@ -144,8 +144,18 @@ public:
                 command.data(), &VcsCommand::cancel);
         connect(command.data(), &VcsCommand::stdOutText, this, &GitGrepRunner::read);
         SynchronousProcessResponse resp = command->runCommand(client->vcsBinary(), arguments, 0);
-        if (resp.result != SynchronousProcessResponse::Finished)
+        switch (resp.result) {
+        case SynchronousProcessResponse::TerminatedAbnormally:
+        case SynchronousProcessResponse::StartFailed:
+        case SynchronousProcessResponse::Hang:
             m_fi.reportCanceled();
+            break;
+        case SynchronousProcessResponse::Finished:
+        case SynchronousProcessResponse::FinishedError:
+            // When no results are found, git-grep exits with non-zero status.
+            // Do not consider this as an error.
+            break;
+        }
     }
 
     static void run(QFutureInterface<FileSearchResultList> &fi,