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."). 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). or 2. make the hooks targets .PHONY (force them to run all the time), and compare copy the source hook over the target hook when its checksum differs (using e.g. coreutils' cksum). -- Thanks, Maxim
