bug#81520: Add pre-receive hook to Savannah to reject LLM-encumbered commits

Sean Whitton <[email protected]> Thu, 30 Jul 2026 11:40:46 +0100
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Jim Porter [29/Jul  6:54pm -07] wrote:
> X-Debbugs-CC: [email protected]
>
> As discussed on emacs-devel, here's a small Git hook that we can install
> on Savannah to reject commits with LLM attributions. This will hopefully
> let us avoid force-pushes in the future to remove any such commits (or
> less-drastic measures like reverting them).
>
> After some thought, I opted to do this as a pre-receive hook on Savannah
> instead of a commit-msg or pre-push hook in people's local clones. This
> way, only people with commit access will see the error. I think we can
> and should trust those with commit rights, but others may take the error
> as impetus to hide their LLM usage. (Since this is simply a best-effort
> script to make life easier for maintainers, I'm not too worried about
> this being "security through obscurity".)

We already have a simple pre-receive hook that rejects commits that
we've previously force-pushed to get rid of (currently it only lists the
most recent case).  So your pre-receive hook would need to be integrated
with that code.  But I think keeping a very simple pre-receive hook is
desirable when we can't edit it without going through the Savannah
admins each time.

So, I think this should be a local hook.

-- 
Sean Whitton