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)
This commit is contained in:
Jose Luis Duran 2024-11-05 01:13:22 +00:00
parent 2377c19a8c
commit 9e84289f2c
No known key found for this signature in database
GPG Key ID: 5415E244477475CC

View File

@ -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'