Dec 3, 2025 12:41:22 AM Maxim Cournoyer <[email protected]>:
Hi,
Ludovic Courtès <[email protected]> writes:
Hi Maxim,
Maxim Cournoyer <[email protected]> skribis:
Like I wrote, my guess is that Jodi did not run “make”: that would
have
installed the hook from Guix, and ‘guix git authenticate’ does not
overwrite existing hooks.
My surprise is that 'guix git authenticate' itself takes care of
installing git hooks. Should it really do that when our build system
takes care of it (apparently in a better way) ?
Again, it does not overwrite existing hooks, so that’s fine.
The problem reported here, IIUC, is that it can leave a broken hook in
the Guix repo when the user ran it before running 'make', which appears
to match the documented recommendations from (info "(guix) Building
from
Git"), added in commit 73b3f941d7d911a1b2bb2bf77d37cb3a12ed4291
("maint:
Suggest ‘guix git authenticate’ for initial authentication.").
This is what I was encountering, yes.
I see two ways to fix this:
1. 'guix git authenticate' smarter not install its own hooks when
working from a Guix checkout (by checking the git remote, for example).
I dont think this would be possible for forks as their remote wont match
the official git repo. And in general, its probably not a good idea to
use any complicated heuristics for this. A --no-hook option as Ludovic
suggested would be a good way forward in my opinion.