unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 58813@debbugs.gnu.org
Subject: bug#58813: can't substitute etc/teams.scm command as doc suggests
Date: Thu, 27 Oct 2022 18:27:51 +0200	[thread overview]
Message-ID: <1af5b004bf08bdb954dd7f924b6aa1dbb563c075.camel@gmail.com> (raw)
In-Reply-To: <87lep1qw1s.fsf@gmail.com>

Am Donnerstag, dem 27.10.2022 um 08:40 -0400 schrieb Maxim Cournoyer:
> Hi,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > Am Mittwoch, dem 26.10.2022 um 23:50 -0400 schrieb Maxim Cournoyer:
> > > Hi,
> > > 
> > > Today, I tried;
> > > 
> > > --8<---------------cut here---------------start------------->8---
> > > $ git send-email --to=guix-patches@gnu.org \
> > >   $(./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 <command> [<revision>...] -- [<file>...]'
> > > format-patch -o /tmp/pFSRbRNNoU --add-header="X-Debbugs-Cc:
> > > redacted@gmail.com" --add-header="X-Debbugs-Cc: redacted@email"
> > > [...]: command returned error: 128
> > > 
> > > $ ./etc/teams.scm cc-members origin/master HEAD
> > > --add-header="X-Debbugs-Cc: redacted@email" --add-header="X-
> > > Debbugs-
> > > Cc: redacted@email" ...
> > > --8<---------------cut here---------------end--------------->8---
> > > 
> > > 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.
> > > 
> > > As a quick hacky fix,  I tried removing the space and double
> > > quotes
> > > like:
> > > 
> > > modified   etc/teams.scm.in
> > > @@ -514,7 +514,7 @@ (define (cc . teams)
> > >    "Return arguments for `git send-email' to notify the members
> > > of
> > > the given
> > >  TEAMS when a patch is received by Debbugs."
> > >    (format #true
> > > -          "~{--add-header=\"X-Debbugs-Cc: ~a\"~^ ~}"
> > > +          "~{--add-header=X-Debbugs-Cc:~a~^ ~}"
> > >            (map person-email
> > >                 (delete-duplicates (append-map team-members
> > > teams)
> > > equal?))))
> > > 
> > > and sent a patch with that command:
> > > 
> > > git send-email --to=guix-patches@gnu.org \
> > >   $(./etc/teams.scm cc-members origin/master HEAD 0000-cover-
> > > letter.patch
> > > 
> > > It created https://issues.guix.gnu.org/58812 with it, but I don't
> > > see
> > > any of the X-Debbugs-Cc headers.  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 *.patch
I think we should go with the former and implement a proper "guix send-
email" ;)




  reply	other threads:[~2022-10-27 16:30 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27  3:50 bug#58813: can't substitute etc/teams.scm command as doc suggests Maxim Cournoyer
2022-10-27  6:08 ` Liliana Marie Prikler
2022-10-27 12:40   ` Maxim Cournoyer
2022-10-27 16:27     ` Liliana Marie Prikler [this message]
2023-02-26  3:55 ` bug#58813: [PATCH] doc: Document how to use Patman for patches submission Maxim Cournoyer
2023-02-26  8:25   ` Liliana Marie Prikler
2023-02-26 17:11     ` Maxim Cournoyer
2023-02-27  0:45       ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-02-27 16:43         ` Maxim Cournoyer
2023-03-03  9:54   ` Ludovic Courtès
2023-03-03 17:26     ` Liliana Marie Prikler
2023-03-06 14:53       ` bug#58813: ‘guix style’ flaws Ludovic Courtès
2023-03-06 17:42         ` Maxim Cournoyer
2023-03-07  1:07     ` bug#58813: [PATCH] doc: Document how to use Patman for patches submission Maxim Cournoyer
2023-03-10  9:01       ` Ludovic Courtès
2023-03-10 14:07         ` Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 0/5] Fix teams.scm by use of a new --header-cmd git send-email option Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 1/5] gnu: git: Apply patch adding the --header-cmd feature Maxim Cournoyer
2023-04-23 17:00             ` Liliana Marie Prikler
2023-04-24  0:46               ` Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 2/5] teams: Add 'cc-members-header-cmd' action Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 3/5] teams: Add a configure-git action Maxim Cournoyer
2023-04-23 17:03             ` Liliana Marie Prikler
2023-04-24  0:59               ` Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 0/5] Fix teams.scm by use of a new --header-cmd git send-email option Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 1/5] gnu: git: Apply patch adding the --header-cmd feature Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 2/5] teams: Add 'cc-members-header-cmd' action Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 3/5] Makefile.am: Auto-configure Git on 'make' Maxim Cournoyer
2023-04-24  4:22                 ` Liliana Marie Prikler
2023-04-24 12:37                   ` Maxim Cournoyer
2023-04-28 14:28                 ` Josselin Poiret via Bug reports for GNU Guix
2023-05-01 16:38                   ` bug#58813: can't substitute etc/teams.scm command as doc suggests Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 4/5] teams: Add a 'cc-mentors-header-cmd' action Maxim Cournoyer
2023-04-24  2:29               ` bug#58813: [PATCH v2 5/5] doc: Simplify contributing section by automating git configuration Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 4/5] teams: Add a 'cc-mentors-header-cmd' action Maxim Cournoyer
2023-04-23 16:04           ` bug#58813: [PATCH 5/5] doc: Simplify contributing section by automating git configuration Maxim Cournoyer
2023-03-07 11:35 ` bug#58813: [PATCH v2] doc: Document how to use Patman for patches submission Simon Tournier
2023-03-07 16:46   ` Maxim Cournoyer
2023-03-07 17:39     ` Simon Tournier
2023-03-08  5:29       ` Liliana Marie Prikler
2023-03-08  8:47         ` Simon Tournier
2023-03-08 16:26           ` Maxim Cournoyer
2023-03-08 17:05             ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1af5b004bf08bdb954dd7f924b6aa1dbb563c075.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=58813@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).