From nobody Fri Oct 25 13:23:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XZk4Z6mQqz5Zjnh; Fri, 25 Oct 2024 13:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XZk4Z5Ml8z4KGH; Fri, 25 Oct 2024 13:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729862606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oaCvMYB4StV8nNlts2FPkx+GpnvNkpgTkvqSZpXTWb4=; b=lOGJlQYOxHvCl/uSSx8iB+abpqW/ocS36QHA4PrfAQ88xbIbqVuBt9b0Nil1aXZT0rtUGY 0T3eLBhdN5IYHuirQmESS4csmZnv3TU1V4advhSoZIdugz1qBr7/sJLkoY/XEPzUztEMbq nU8FM65eJd+2ayHA5c8zPgHIdLB2rENc/ij8pMRV1o1URgr41WwnnP5tNpeLuuCyk3E32F qJNyBy33uBPKZwFGEGVnKoRi8Jy04E4dEILAqTMtXO7bpPWXnA1Y1bz4+TMh9BNrzTMDKk eFeDaUA+AIkvg2ckQ27yM2T+Ds8MoUPTdE3aN8ba22nGlsr8iQz+ix2PLUkQng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729862606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oaCvMYB4StV8nNlts2FPkx+GpnvNkpgTkvqSZpXTWb4=; b=DAwh0veSEfD3zRJ4vdg+XJa3ZxXHprLtYzDsVVhhdRjkieFXsrRsVU21vteUqXVei/aYP2 Gph7iCs43M9w8gazsRWgSZyJrME69t7SiihHbsBrLbGEtXzAGotrEkKqpp/ZkgMSFCT0rN R1/4WKmjC+EuOsEULSXk3i5nvg9p72Idh7c4baoHqsbMjccCcmHmFGYMP3d8I9ZXD+Hx/6 hI4kuyMS4vrAkLuGW8oI2MCvcicX9hbwWV7z7IiUmv7Ogru7CiCuDwXHgrkZ1jLVlN0NpU 2M+aTWC6DshGfCiMlyh8Goa0hEs/0TN7X/qsWwXfGkzQ9GxXR3benMmbP/TDWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729862606; a=rsa-sha256; cv=none; b=RLFOjqbq+r179BJhiv01ekgWpuo6ZVETpdkGZOwOBGG2tuXHitW2HOho+yT4iMJ3mxHYzO IVB88rW5HI3HgTC5zq4HJahR9VfAQllDzAvfpV0DsIYBcjvUxYnMj1iIeHWq/QUDPPmRi/ 3gzwcRyVR6NYL0EODBgfkz8A2vEgnJx9FE+GZhEH0gfRrCZtNr5urIHQnHx0YaMPRKILdB qDoWxe3omS1rDaSQgpv6LrjC7WNlp/bHcLSzEkegz1mswPDTwy8bvoOFA55t8MKmlJIYYN F3WyDak+AZnDXbaDRF7zhLwNQoiUkIVkwd+V5d3/H3pRHt2UvPmsc6BBJJOG2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XZk4Z4ywXzSW5; Fri, 25 Oct 2024 13:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49PDNQk1041918; Fri, 25 Oct 2024 13:23:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49PDNQx2041915; Fri, 25 Oct 2024 13:23:26 GMT (envelope-from git) Date: Fri, 25 Oct 2024 13:23:26 GMT Message-Id: <202410251323.49PDNQx2041915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 7d875598fc9f - main - git-arc: Make patch with reviewers more portable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d875598fc9fdbe554644fc1109645362f21b824 Auto-Submitted: auto-generated The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=7d875598fc9fdbe554644fc1109645362f21b824 commit 7d875598fc9fdbe554644fc1109645362f21b824 Author: Jose Luis Duran AuthorDate: 2024-10-25 13:14:14 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2024-10-25 13:22:52 +0000 git-arc: Make patch with reviewers more portable Avoid an ArcanistUsageException: Provide method parameters on stdin as a JSON blob. Due to an invalid JSON input on strict POSIX-compliant shells (macOS): echo '{ "constraints": {"phids": [-n,"PHID-USER-xxx",]} }' ^^^ ^ Change the non-portable "echo -n" to a printf. Reviewed by: 0mp, imp, markj Approved by: markj (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46781 --- tools/tools/git/git-arc.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index e9398a60d2f7..3261f4461dc6 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -328,10 +328,10 @@ diff2reviewers() jq '.response.data[0].attachments.reviewers.reviewers[] | select(.status == "accepted").reviewerPHID') if [ -n "$userids" ]; then echo '{ - "constraints": {"phids": ['"$(echo -n "$userids" | tr '[:space:]' ',')"']} + "constraints": {"phids": ['"$(printf "%s" "$userids" | tr '[:space:]' ',')"']} }' | - arc_call_conduit -- user.search | - jq -r '.response.data[].fields.username' + arc_call_conduit -- user.search | + jq -r '.response.data[].fields.username' fi } @@ -444,7 +444,7 @@ gitarc__list() for commit in $commits; do chash=$(git show -s --format='%C(auto)%h' "$commit") - echo -n "${chash} " + printf "%s" "${chash} " diff=$(log2diff "$commit") if [ -n "$diff" ]; then @@ -461,7 +461,7 @@ gitarc__list() if [ -z "$diff" ]; then echo "No Review : $title" elif [ "$(echo "$diff" | wc -l)" -ne 1 ]; then - echo -n "Ambiguous Reviews: " + printf "%s" "Ambiguous Reviews: " echo "$diff" | grep -E -o 'D[1-9][0-9]*:' | tr -d ':' \ | paste -sd ',' - | sed 's/,/, /g' else