diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index 6c6d2ac4..1ff299ec 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -600,7 +600,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { public function getCanonicalRevisionName($string) { $match = null; - if (preg_match('/@([0-9]+)$/', $string, $match)) { + if ($string !== null && preg_match('/@([0-9]+)$/', $string, $match)) { $stdout = $this->getHashFromFromSVNRevisionNumber($match[1]); } else { list($stdout) = $this->execxLocal(