From 9e84289f2c7e6b632047a75b653fcd587287a8b9 Mon Sep 17 00:00:00 2001 From: Jose Luis Duran Date: Tue, 5 Nov 2024 01:13:22 +0000 Subject: [PATCH] git-arc: Prefer echo over printf Prefer echo over printf. Prevent the newline character from being translated by using 'blank' instead of 'space' in the re_format. This change was reviewed in: https://reviews.freebsd.org/D47289 Committed separately for clarity. Suggested by: des Approved by: emaste (mentor) --- tools/tools/git/git-arc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 64d1ee2bd63f..050ec4ec1f2c 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -341,7 +341,7 @@ diff2reviewers() jq '.response.data[0].attachments.reviewers.reviewers[] | select(.status == "accepted").reviewerPHID') if [ -n "$userids" ]; then echo '{ - "constraints": {"phids": ['"$(printf "%s" "$userids" | tr '[:space:]' ',')"']} + "constraints": {"phids": ['"$(echo "$userids" | tr '[:blank:]' ',')"']} }' | arc_call_conduit -- user.search | jq -r '.response.data[].fields.username'