devel/arcanist-lib: handle 'arc patch' runtime exception

Approved by:	grembo (maintainer)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37969

(cherry picked from commit e828e846e9)
This commit is contained in:
Joseph Mingrone 2023-01-06 13:33:28 -04:00
parent 74869232a1
commit eca85de864
No known key found for this signature in database
GPG Key ID: 36A40C83B0D6EF9E
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PORTNAME?= arcanist
PORTVERSION?= 20220518
PORTREVISION?= 1
PORTREVISION?= 2
CATEGORIES?= devel
PKGNAMESUFFIX= ${SLAVE_PKGNAMESUFFIX}${PHP_PKGNAMESUFFIX}

View File

@ -0,0 +1,11 @@
--- src/repository/api/ArcanistGitAPI.php.orig 2023-01-06 17:27:38 UTC
+++ src/repository/api/ArcanistGitAPI.php
@@ -1143,7 +1143,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryA
public function hasLocalCommit($commit) {
try {
- if (!$this->getCanonicalRevisionName($commit)) {
+ if (!$this->getCanonicalRevisionName($commit ?? '')) {
return false;
}
} catch (CommandException $exception) {