From nobody Wed Dec 04 02:39:36 2024 X-Original-To: dev-commits-src-main@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 4Y31vD48r4z5fkJw; Wed, 04 Dec 2024 02:39:36 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y31vD3d3pz4FFJ; Wed, 4 Dec 2024 02:39:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733279976; 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=zVgYN8HPx6saojKLVtxa6UYkX50UegMP2Ctdr7ouyaw=; b=m8YwY0/l5x9Fm7OskRVmbKd7UorUgLlLF0JlbebQ1VeSbvhpRy3lBOEPGnyKPc79fX/AO9 h8f4nu4aoQNxa4nY0F/5GBvNDYJw1Scv0ABvQJmnJt0TuAxkvCYSLzjZf9wM84eoF2Q1Mg TojNQXDZXoZSnqDa62a51/KGPzZ+8Di10iP6fsENnbFMqFdXLxAd3zPhdqesQcte4UqHUO UvQSC9UN5F/iuwEb9PshPUJlrPdzJkZ/JfzPZ0h0ZD/Z2I/J1Th6JXO7nfkKUk/VKHnjLN 00ExZ9RZcPGN0spspko7zjTNhezYBskwr+fLWXQPxpzIEVO+7VFyWbTP0sFQLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733279976; 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=zVgYN8HPx6saojKLVtxa6UYkX50UegMP2Ctdr7ouyaw=; b=l7GXlPa8HKSuh4GysMiGxHGwnCXZ4c/REugg2NPb2ej7ncWvZITri1t+lLOLHW+vdiLZQY XBj8ojM3JhnMKMUtGVCjzKt1NyORGqZBZE4m1xjvO6BVjyJg8QXnW8Dtrvpn5PV4obu/Wx yxN/JzruL1/kctDTGBRy6vXAnoQ9V4KyjD2mmE+nux/BTpZiEjdfIbIctTZnRwjXxcyyV4 /hS/DFHX++AbnakLyTw2IXAjD6foDjxS6wpEeKwzj9RtxtfUroGqbe0zq2DL15c+LmBWuO oOIKFZCdmvBPUGIedQyDVgNvAJ5NeNwUSq+cZk2nYos8CYxTSZHa61jVgTU0SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733279976; a=rsa-sha256; cv=none; b=tvgj4eLmq+pYf6R3adVIn8takALvsQKby4nI92fqzF6zAWyoYYwi/eEvnkBlOYyWpShMRU cdtKbqZpAaBwgbn7epffNbz4SuAruW5dR/se42mL1st2Jr+j4IW13lpELsKdtaiRASMIrT V07m6pzb41r2dVCzHMKPbd2c+jvCYb408/CVBgNqQPn6hZOjusm2hK3qEVlocDxNLL0qKN 2VxSPYazJOwwllCV0/WjkwYcB+/I6hCa+A7jlM7PbMMX3hA0nPQ0Y1O/0AcoGxoudTGRKH 1QzX+AoUGoPHiEk6cMSKi+GP8BT7dnqFoyIO/JYxM0aKI3AkKfWGOapokeSdAQ== 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 4Y31vD35dHzpsG; Wed, 4 Dec 2024 02:39:36 +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 4B42datJ087675; Wed, 4 Dec 2024 02:39:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B42dan8087672; Wed, 4 Dec 2024 02:39:36 GMT (envelope-from git) Date: Wed, 4 Dec 2024 02:39:36 GMT Message-Id: <202412040239.4B42dan8087672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d6ed5ff4ac7d - main - git-arc: fix diff2reviewers() with multiple reviewers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6ed5ff4ac7d9610385b35f77539ccf5bae8cc65 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d6ed5ff4ac7d9610385b35f77539ccf5bae8cc65 commit d6ed5ff4ac7d9610385b35f77539ccf5bae8cc65 Author: Gleb Smirnoff AuthorDate: 2024-12-04 02:38:41 +0000 Commit: Gleb Smirnoff CommitDate: 2024-12-04 02:38:41 +0000 git-arc: fix diff2reviewers() with multiple reviewers The select command of jq provides us with a multiline output. Thus, the ${userids} is a newline separated list. The recent change 9e84289f2c7e explicitly said that we aren't going to translate newline to comma when constructing JSON for the next command. It also forces the ${userids} to be printed as is, with shell's field splitting disabled. So we end up with invalid JSON, that is missing commas. Fix this by enabling shell's field splitting by printing ${userids} outside of double quotes. Reviewed by: jlduran, imp, emaste Differential Revision: https://reviews.freebsd.org/D47889 Fixes: 9e84289f2c7e6b632047a75b653fcd587287a8b9 --- 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 6ef1abf4e0c6..b49721159799 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": ['"$(echo "$userids" | tr '[:blank:]' ',')"']} + "constraints": {"phids": ['"$(echo $userids | tr '[:blank:]' ',')"']} }' | arc_call_conduit -- user.search | jq -r '.response.data[].fields.username'