Commit 5db0ef19 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Git: Do not report canceled for Grep when no results were found

Change-Id: Ib1916c345bd345ee3dd5179c84bb259c2992303e
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 9117b28e
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment