git: eca85de86496 - 2023Q1 - devel/arcanist-lib: handle 'arc patch' runtime exception

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Fri, 06 Jan 2023 19:33:39 UTC
The branch 2023Q1 has been updated by jrm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eca85de86496d77af305e4e60f5468773ef891b4

commit eca85de86496d77af305e4e60f5468773ef891b4
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2023-01-06 17:33:28 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2023-01-06 19:26:40 +0000

    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 e828e846e9fb1079bc75cdd33789ceff248bfe74)
---
 devel/arcanist-lib/Makefile                                   |  2 +-
 .../files/patch-src_repository_api_ArcanistGitAPI.php         | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/devel/arcanist-lib/Makefile b/devel/arcanist-lib/Makefile
index a22e2ad35e3d..8fbe5718f993 100644
--- a/devel/arcanist-lib/Makefile
+++ b/devel/arcanist-lib/Makefile
@@ -1,6 +1,6 @@
 PORTNAME?=	arcanist
 PORTVERSION?=	20220518
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES?=	devel
 PKGNAMESUFFIX=	${SLAVE_PKGNAMESUFFIX}${PHP_PKGNAMESUFFIX}
 
diff --git a/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php b/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php
new file mode 100644
index 000000000000..fa73cbef6e63
--- /dev/null
+++ b/devel/arcanist-lib/files/patch-src_repository_api_ArcanistGitAPI.php
@@ -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) {