all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bogus ‘etc/teams.scm’ usage recommendations?
@ 2023-01-03 22:29 Ludovic Courtès
  2023-01-05 12:21 ` Simon Tournier
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2023-01-03 22:29 UTC (permalink / raw)
  To: guix-devel

Hello Guix!

The manual recommends this (info "(guix) Teams"):

  git send-email --to ISSUE_NUMBER@debbugs.gnu.org $(./etc/teams.scm cc mentors) *.patch

where:

--8<---------------cut here---------------start------------->8---
λ ./etc/teams.scm cc mentors
--add-header="X-Debbugs-Cc: rg@raghavgururajan.name" --add-header="X-Debbugs-Cc: zimon.toutoune@gmail.com" …
--8<---------------cut here---------------end--------------->8---

I believe this cannot work because the shell will split words on each
whitespace; IOW, the double quotes above do not have the desired effect.

The second issue is that passing ‘--add-header’ to ‘git send-email’
seems to have no effect.  AIUI, ‘git send-email’ passes those to ‘git
format-patch’, except that it has no reason to invoke it, right?

Maybe I’m missing something but it looks like we have documentation to
improve.  Thoughts?

Ludo’.


^ permalink raw reply	[flat|nested] 14+ messages in thread
* bug#58813: [PATCH 3/5] teams: Add a configure-git action.
@ 2023-04-23 17:03 Liliana Marie Prikler
  2023-04-24  2:29 ` bug#58813: [PATCH v2 3/5] Makefile.am: Auto-configure Git on 'make' Maxim Cournoyer
  0 siblings, 1 reply; 14+ messages in thread
From: Liliana Marie Prikler @ 2023-04-23 17:03 UTC (permalink / raw)
  To: Maxim Cournoyer, 58813; +Cc: ludo, zimon.toutoune

Am Sonntag, dem 23.04.2023 um 12:04 -0400 schrieb Maxim Cournoyer:
> * etc/git/gitconfig: Augment configuration template with useful
> options to
> allow for auto-configuration.
> * etc/teams.scm.in (configure-git): New procedure.
> (main): Register it and add documentation.
I think configure-git is somewhat out of scope inside teams.scm.  We do
already tell people to set up their push hooks, so we probably ought to
solve this via documentation (or a separate dedicated script) as well.

Otherwise LGTM.

Cheers




^ permalink raw reply	[flat|nested] 14+ messages in thread
* bug#58813: can't substitute etc/teams.scm command as doc suggests
@ 2022-10-27  3:50 Maxim Cournoyer
  2022-10-27  6:08 ` Liliana Marie Prikler
  0 siblings, 1 reply; 14+ messages in thread
From: Maxim Cournoyer @ 2022-10-27  3:50 UTC (permalink / raw)
  To: 58813

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.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-05-01 16:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 22:29 Bogus ‘etc/teams.scm’ usage recommendations? Ludovic Courtès
2023-01-05 12:21 ` Simon Tournier
2023-01-05 17:03   ` bug#58813: " Maxim Cournoyer
2023-01-09 17:23     ` bug#58813: can't substitute etc/teams.scm command as doc suggests Ludovic Courtès
2023-01-09 20:52       ` Maxim Cournoyer
2023-01-11 15:20         ` Simon Tournier
2023-01-12  3:00           ` Maxim Cournoyer
2023-01-12 13:31             ` Simon Tournier
2023-01-05 17:03   ` Bogus ‘etc/teams.scm’ usage recommendations? Maxim Cournoyer
  -- strict thread matches above, loose matches on Subject: below --
2023-04-23 17:03 bug#58813: [PATCH 3/5] teams: Add a configure-git action Liliana Marie Prikler
2023-04-24  2:29 ` bug#58813: [PATCH v2 3/5] Makefile.am: Auto-configure Git on 'make' 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
2022-10-27  3:50 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.