cpliakas / git-wrapper

A PHP wrapper around the Git command line utility.
MIT License
506 stars 68 forks source link

Unclear errorhandling in git->grep #227

Closed robiasto closed 3 years ago

robiasto commented 3 years ago

git->grep should not define "no matches" as an exception, at least it should throw a meaningful error message.

try {
     return $git->grep('-c', '-e', addslashes($searchKey), '-or', '-e', $key, '--', $path);
} catch (GitException $e) {
     if ($e->getMessage() === '') {
          return null;
     }
     throw $e;
}
TomasVotruba commented 3 years ago

Hi, this repository is deprecated. See https://github.com/cpliakas/git-wrapper/issues/225

We accept contributions in here https://github.com/symplify/symplify

Thank you for improving current code base!