diff mbox series

[bug#66605] etc: gitconfig: Run etc/teams.scm from correct environment.

Message ID d5abdf65dfd8d835e3a7ae9aa5c419bca0f55db6.1697630719.git.clement@lassieur.org
State New
Headers show
Series [bug#66605] etc: gitconfig: Run etc/teams.scm from correct environment. | expand

Commit Message

Clément Lassieur Oct. 18, 2023, 12:05 p.m. UTC
* etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
etc/teams.scm script so that any user that have git:send-email installed can
use it in the Guix checkout without changing their environment.
---
 etc/git/gitconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 5498835bb38c0de57f284f0fa6b1178ecdcaf678
prerequisite-patch-id: d95e49e4fc059972fc5a7b2c92816df2228a0af1
prerequisite-patch-id: a0dca8c3175d6ce71c77e220c4ac98b6e97cef56

Comments

Maxim Cournoyer Oct. 18, 2023, 5:54 p.m. UTC | #1
Hi,

Clément Lassieur <clement@lassieur.org> writes:

> * etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
> etc/teams.scm script so that any user that have git:send-email installed can
> use it in the Guix checkout without changing their environment.

I'm not sure I understand; why does etc/teams.scm cc-members-header-cmd
fail in an environment where git:send-email is available?
Clément Lassieur Oct. 18, 2023, 8:52 p.m. UTC | #2
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

>> * etc/git/gitconfig: Prepend "guix shell -D guix --pure ./pre-inst-env" to the
>> etc/teams.scm script so that any user that have git:send-email installed can
>> use it in the Guix checkout without changing their environment.
>
> I'm not sure I understand; why does etc/teams.scm cc-members-header-cmd
> fail in an environment where git:send-email is available?

Because it requires (git) and (guix ui).  So you need ./pre-inst-env for
(guix ui), plus guile, guile-git and guile-gcrypt.  The minimal setup
would be:

    `guix shell guile guile-git guile-gcrypt git git:send-email --pure -- ./pre-inst-env git send-email`

or

    `guix shell guile guile-git guile-gcrypt -- ./pre-inst-env git send-email`

with an impure environment containing git and git:send-email.

But it could be shortened as

    `guix shell git:send-email -D guix --pure -- ./pre-inst-env git send-email`

However, in this case `guix shell git:send-email` is necessary even with
impure environments containing git and git:send-email because `-D guix`
pulls git without pulling git:send-email.

Thanks,
Clément
diff mbox series

Patch

diff --git a/etc/git/gitconfig b/etc/git/gitconfig
index 907ad0180454..757360220155 100644
--- a/etc/git/gitconfig
+++ b/etc/git/gitconfig
@@ -14,5 +14,5 @@ 
 
 [sendemail]
         to = guix-patches@gnu.org
-        headerCmd = etc/teams.scm cc-members-header-cmd
+        headerCmd = guix shell -D guix --pure -- ./pre-inst-env etc/teams.scm cc-members-header-cmd
         thread = no