{"thread":{"id":"4647","subject":"commit triggers.","startedAt":"2006-06-24T03:29:08Z","lastAt":"2006-06-24T06:43:03Z","messageCount":2,"participants":["Dave Jones","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22417","messageId":"20060624032908.GH19461@redhat.com","threadId":"4647","inReplyTo":null,"subject":"commit triggers.","fromName":"Dave Jones","fromEmail":"davej@redhat.com","sentAt":"2006-06-24T03:29:08Z","receivedAt":"2006-06-24T03:29:08Z","isPatch":false,"sender":{"key":"davej@redhat.com","avatar":null},"body":"I've grepped around, and come up with nothing, so hopefully\nI'm not overlooking some already-implemented feature\n(though it'd be great if I am).  How much work is involved in\ncreating a mechanism where some scripts living in say .git/triggers/\nget executed on commits ?\n\nThe idea behind this stems from some scripts I've been running\nperiodically against an mbox of the daily kernel commits, which\ngreps for common bugs; kmalloc(GFP, size) instead of kmalloc(size,GFP),\nmemsets with reversed 2nd/3rd args etc etc.\n\nIt'd be useful I think to have a way to hook up such a script\nto git's commit process that aborts a commit if a script returns\na hit, forcing the user to fix up the mistake before committing\nit to the world.\n\nthoughts ?\n\n\t\tDave\n\n-- \nhttp://www.codemonkey.org.uk\n"},{"id":"22419","messageId":"7vmzc32gw8.fsf@assigned-by-dhcp.cox.net","threadId":"4647","inReplyTo":"20060624032908.GH19461@redhat.com","subject":"Re: commit triggers.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-24T06:43:03Z","receivedAt":"2006-06-24T06:43:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dave Jones <davej@redhat.com> writes:\n\n> I've grepped around, and come up with nothing, so hopefully\n> I'm not overlooking some already-implemented feature\n> (though it'd be great if I am).  How much work is involved in\n> creating a mechanism where some scripts living in say .git/triggers/\n> get executed on commits ?\n\nPerhaps \"grep hooks/ git-commit.sh\"?\n\nThe hooks we have right now are more interested in preventing\nyou from making crappy commits, so we might not have a\npost-commit hook you can use for notification purposes, but if\nthat is the case I am open to suggestions to add one.  I think\npost-commit hook is already there, though.\n"}]}