From: Ben Knoble Date: Fri, 29 May 2026 17:52:19 GMT Subject: Re: git hook question Message-ID: <710DE79D-35C3-441B-9D7B-CE90798FA0C2@gmail.com> In-Reply-To: > Le 29 mai 2026 à 12:17, Wesley Schwengle a écrit : > > On 5/29/26 01:21, Jeff King wrote: >>> On Fri, May 29, 2026 at 01:01:34AM -0400, Wesley Schwengle wrote: >>> I understand the why, normally pre-push gets ` SP >>> SP SP LF'. This has a >>> similar feel, albeit a different syntax. The difference feels like a minor >>> bug, but not one I'm worried about at this moment: you would expect it to >>> get the same arguments/parameters as the regular pre-push hook. But I >>> digress. >> I think the "git hook" command is mostly intended for scripting, and the >> caller is expected to understand the context and provide the appropriate >> arguments. The hook command itself doesn't know about what a "pre-push" >> hook should look like. >> So not a bug, but definitely a gotcha that could perhaps be better >> explained in the documentation. > > I think the "normal" pre-push makes more sense than the one I'm seeing right now, but perhaps that's me. But I think that the docs would perhaps need an update to why this `remote url' are the arguments. Especially if you read `githooks(5)' it seems a little strange. The hooks manual says that the pre-push hook is invoked with 2 parameters (name and location of the destination).