From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +OsENbp8WmM9TwEAbAwnHQ (envelope-from ) for ; Thu, 27 Oct 2022 14:42:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CPWMNLp8WmNUcAAAauVa8A (envelope-from ) for ; Thu, 27 Oct 2022 14:42:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7663A15029 for ; Thu, 27 Oct 2022 14:42:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo2C0-0003Jz-Ko; Thu, 27 Oct 2022 08:41:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo2By-0002gw-Gc for bug-guix@gnu.org; Thu, 27 Oct 2022 08:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo2Bx-0008Ld-UH for bug-guix@gnu.org; Thu, 27 Oct 2022 08:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oo2Bx-0001PX-Qf for bug-guix@gnu.org; Thu, 27 Oct 2022 08:41:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58813: can't substitute etc/teams.scm command as doc suggests Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 27 Oct 2022 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58813 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Liliana Marie Prikler Cc: 58813@debbugs.gnu.org Received: via spool by 58813-submit@debbugs.gnu.org id=B58813.16668744425386 (code B ref 58813); Thu, 27 Oct 2022 12:41:01 +0000 Received: (at 58813) by debbugs.gnu.org; 27 Oct 2022 12:40:42 +0000 Received: from localhost ([127.0.0.1]:56382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo2Bd-0001On-95 for submit@debbugs.gnu.org; Thu, 27 Oct 2022 08:40:41 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:39543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo2Bb-0001OV-FE for 58813@debbugs.gnu.org; Thu, 27 Oct 2022 08:40:40 -0400 Received: by mail-qk1-f172.google.com with SMTP id a5so731172qkl.6 for <58813@debbugs.gnu.org>; Thu, 27 Oct 2022 05:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=XT5FifNczEIWivKzwh6wsfKcvey/mhrPFRE8rMoQ/C0=; b=FDaEAMTaqSji2JQ+iA7AtntUgZtVwq5/Mb/sYcJMLCNkGzD2BX6KORqNYP4h2sTIf7 40URG9HtbqsVZDYU74Fewwmj4z8dcUbHSQ/NE6T8LgZBL9X+CsttvUpKGhgF+06imvGZ 9mmOE34OZe8W0wr77ft/hsv9LuAXuWGJHZPZbJWT4qOiMMlWrNBgNgehjBEUHD2CBt5+ cKAVQTBlNKDrOEcchQAbKRPTVxWh93XTCgHkwPyuqFx8oGNYwpmGaQDjCu5UWvGyK2jP 8id8SR+FYXTza+ifEZ8fHVvWSWdCdARbgwbO+SPSvbnIkVtozCWdjIJ/hpnKG5GuAjmQ metg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XT5FifNczEIWivKzwh6wsfKcvey/mhrPFRE8rMoQ/C0=; b=rE1wkPFOKOn16pY3eqcC9XiBJXVmRcPhynP7P9M74pBgfY0jhFKEwq8mp68Z5yN5eB kAhuH49PjvC31ZLlfBFEanB3rLdZF6kPEP3QBsjD6BF/4FTl7wzul8tZIq87dHBcDyyy icaFGJy0LyEvMzQ3VxRDSzzQp++cBy998F78D4ZJfq9rkfN235aFO6+HA6TkKqcaO+k9 1VtaXMpjsAloHsicEGyQwvlSRCpy4I+Wdv1kTHeYVtdvHL8l8kqhSIvW6MJxKpKb3Q7T POoZvVG/uXo2Qxg1VI0I84LCMKfrlle4yv/Z/pOurTZpxM10bcS9ibEXi7uwDU+XTV15 uNIQ== X-Gm-Message-State: ACrzQf0DBLHxDw2hgwnl9uKJBxBVi285MPdDQY/DFCUgdyhgiDleo5PQ muaXWjSf6IpX3PqeHfq4h4IXWZWBhI8= X-Google-Smtp-Source: AMsMyM6xUvTIOSibifW/WVd5QXxIGIFDkAgtiWDurcLhwCZUs5Ol9fHnATgmdiydth8DiBQvETOwBA== X-Received: by 2002:a05:620a:15fb:b0:6f9:ab6a:439a with SMTP id p27-20020a05620a15fb00b006f9ab6a439amr4380868qkm.231.1666874433652; Thu, 27 Oct 2022 05:40:33 -0700 (PDT) Received: from hurd (dsl-152-179.b2b2c.ca. [66.158.152.179]) by smtp.gmail.com with ESMTPSA id j8-20020a05620a288800b006fa00941e9dsm226394qkp.136.2022.10.27.05.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 05:40:33 -0700 (PDT) From: Maxim Cournoyer References: <87r0yuq615.fsf@gmail.com> <05f449076bd7fd65f3cd301cbed4101490b3b2db.camel@gmail.com> Date: Thu, 27 Oct 2022 08:40:31 -0400 In-Reply-To: <05f449076bd7fd65f3cd301cbed4101490b3b2db.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 27 Oct 2022 08:08:35 +0200") Message-ID: <87lep1qw1s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "bug-Guix" Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666874554; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XT5FifNczEIWivKzwh6wsfKcvey/mhrPFRE8rMoQ/C0=; b=petgF7eOsAJRCxU4xIhyp177PTPZGADKYoAd514wzs8DUrHH8YqzUrRQ7oCXMqb1Opvub6 WWBtXwOvYWwImPcoqyMsQsO5Y9k9V8cRB/5pLKPwOAR/uJJSwv+FPltYBec9lLnI0lf1Zm xC/bsj8Y9KaSem0+UXvRGpZd+7C/vd57ICP93XKeXNcgMzsLZ9vnq7izN75iTlK8F7V19c SxJIVuCNASsWAjhdE/dY65uQhop87l4wymc565Yv+mDNODnMjxw+avu1M+2RlNqn3waI4Z 0iEYV/c+c1WsCezzXlgqZ9M4lQKydMiE/d1e4LZBuSIY9uisbB1ZyQ8PKBiVvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666874554; a=rsa-sha256; cv=none; b=QLRe/Km15+U9E9eTacUDhc+uygKisbN96uTkFQt3HIO/WjFXddW3/TIRaOclW5fNEoxkI/ v4beITM7yLh+7r2QHhox27ZCBMPN974Aegzce4aIZ9bWBPq4Z7BxXiOxGgWr4eDGuV/ohm XMafaLfBy7zr+g6rn2LnxhdWLLTJLN7mpJ3T603YVosJzawl3hXg+cVBNTfIESzs1GOHdD aDBuwj+f9Yz9hJrYtzi6iOJNPRndoEUDFdqoeGwolTcgZ0Ah1gMFokVobcKOmnn2769OUq p0j5QlLe7UjWJSFyo8brozXf8gZmAdI8flgF8KzAdfe+9XOF/QaxYcR0AnzdtQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=FDaEAMTa; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 7.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=FDaEAMTa; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7663A15029 X-Spam-Score: 7.58 X-Migadu-Scanner: scn1.migadu.com X-TUID: rir79Rntb9LM Hi, Liliana Marie Prikler writes: > Am Mittwoch, dem 26.10.2022 um 23:50 -0400 schrieb Maxim Cournoyer: >> Hi, >>=20 >> Today, I tried; >>=20 >> --8<---------------cut here---------------start------------->8--- >> $ git send-email --to=3Dguix-patches@gnu.org=C2=A0\ >> =C2=A0 $(./etc/teams.scm cc-members origin/master HEAD) 0000-cover- >> letter.patch >> fatal: ambiguous argument 'some.email@redacted.com"': unknown >> revision or path not in the working tree. >> Use '--' to separate paths from revisions, like this: >> 'git [...] -- [...]' >> format-patch -o /tmp/pFSRbRNNoU --add-header=3D"X-Debbugs-Cc: >> redacted@gmail.com" --add-header=3D"X-Debbugs-Cc: redacted@email" >> [...]: command returned error: 128 >>=20 >> $ ./etc/teams.scm cc-members origin/master HEAD >> --add-header=3D"X-Debbugs-Cc: redacted@email" --add-header=3D"X-Debbugs- >> Cc: redacted@email" ... >> --8<---------------cut here---------------end--------------->8--- >>=20 >> You can see the command fails; this is because when using Bash >> command substitution $(), the quotes in the result are not >> interpreted and are thus part of the value (literals), which then >> gets split on white space. >>=20 >> As a quick hacky fix,=C2=A0 I tried removing the space and double quotes >> like: >>=20 >> modified=C2=A0=C2=A0 etc/teams.scm.in >> @@ -514,7 +514,7 @@ (define (cc . teams) >> =C2=A0=C2=A0 "Return arguments for `git send-email' to notify the member= s of >> the given >> =C2=A0TEAMS when a patch is received by Debbugs." >> =C2=A0=C2=A0 (format #true >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "~{--add-header= =3D\"X-Debbugs-Cc: ~a\"~^ ~}" >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "~{--add-header= =3DX-Debbugs-Cc:~a~^ ~}" >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (map person= -email >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (delete-duplicates (append-map team-members teams) >> equal?)))) >>=20 >> and sent a patch with that command: >>=20 >> git send-email --to=3Dguix-patches@gnu.org=C2=A0\ >> =C2=A0 $(./etc/teams.scm cc-members origin/master HEAD 0000-cover- >> letter.patch >>=20 >> It created https://issues.guix.gnu.org/58812=C2=A0with it, but I don't s= ee >> any of the X-Debbugs-Cc headers.=C2=A0 Mmmh. > Note that the existing etc/teams also assumes there are no funny > characters in the quote. So it's susceptible to good ol' bobby tables. > > Could we, instead of outputting a command, make it so that we can pass > an already formatted patch and etc/teams rewrites it? The solution suggested to me in #bash would be to turn etc/teams.scm into a git wrapper, that could invoke git with all the arguments at once (allowing people to pass arguments themselves). I'm told the git completion could be hooked to such script so that users can still enjoy git tab-completion when using etc/teams.scm, although I haven't researched how that'd all work. A similar idea proposed by selckin on #git would be to have our etc/teams.scm script receive the complete git command, and append the args to it itself (and invoke it), like so: ./etc/teams.scm cc mentors -- git send-email --to XXX@debbugs.gnu.org *.pat= ch --=20 Thanks, Maxim