git/list[1] front-page[2] threads[3] people[4] search[5] about
 

commit triggers.

From
DJDave Jones <davej@redhat.com>
Date
Jun 24, 2006, 03:29 UTC
Message-ID
<20060624032908.GH19461@redhat.com>

I've grepped around, and come up with nothing, so hopefully I'm not overlooking some already-implemented feature (though it'd be great if I am). How much work is involved in creating a mechanism where some scripts living in say .git/triggers/ get executed on commits ?

The idea behind this stems from some scripts I've been running periodically against an mbox of the daily kernel commits, which greps for common bugs; kmalloc(GFP, size) instead of kmalloc(size,GFP), memsets with reversed 2nd/3rd args etc etc.

It'd be useful I think to have a way to hook up such a script to git's commit process that aborts a commit if a script returns a hit, forcing the user to fix up the mistake before committing it to the world.

thoughts ?
		Dave
-- 
http://www.codemonkey.org.uk
Next: Junio C Hamano
Message 1 of 2 in “commit triggers.”
  1. Dave JonesJun 24, 2006
  2. Junio C HamanoJun 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.