git: 4ed2c3f9ce28 - main - WIP: Cross-user git arc stage

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Tue, 08 Apr 2025 10:49:04 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=4ed2c3f9ce28df401fc427bd60a8e3d9ecb40f4d

commit 4ed2c3f9ce28df401fc427bd60a8e3d9ecb40f4d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-02-17 15:45:06 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-04-08 10:31:43 +0000

    WIP: Cross-user git arc stage
---
 tools/tools/git/git-arc.sh | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
index 7d2387565b9a..9bee35831844 100644
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -243,12 +243,18 @@ title2diff()
     local title
 
     title=$(echo $1 | sed 's/"/\\"/g')
-    arc_list --no-ansi |
-        awk -F': ' '{
-            if (substr($0, index($0, FS) + length(FS)) == "'"$title"'") {
-                print substr($1, match($1, "D[1-9][0-9]*"))
-            }
-        }'
+    #arc_list --no-ansi |
+    #    awk -F': ' '{
+    #        if (substr($0, index($0, FS) + length(FS)) == "'"$title"'") {
+    #            print substr($1, match($1, "D[1-9][0-9]*"))
+    #        }
+    #    }'
+
+    echo "{
+        \"queryKey\": \"all\",
+        \"constraints\": { \"query\": \"title:${title}\" } }" |
+        arc_call_conduit -- differential.revision.search |
+        jq -r ".response.data[] | select(.fields.title=\"${title}\") | @text \"D\( .id )\""
 }
 
 commit2diff()