From 4ed2c3f9ce28df401fc427bd60a8e3d9ecb40f4d Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 17 Feb 2025 15:45:06 +0000 Subject: [PATCH] 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 7d2387565b9..9bee3583184 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()