Re: ChangeLogs in commit messages
Andreas Arnez <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 15 2014, Gary Benson wrote: > Joel Brobecker wrote: >> > Does anybody have any experience writing such checks? Or, does >> > anybody know of any project that already uses such checks? I can >> > look into doing it myself (it's a pre-receive hook, right?) >> >> I have loads of experience writing git hooks, but none with >> this repository's implementation. >> >> I would typically adjust the "update" hook for that, but it looks >> like the "pre-receive" hook would also work. > > I've put together a quick pre-receive hook (inlined below). Each > received commit on the "master" branch that touches the "gdb" > subdirectory gets its message checked. The check itself is fairly > cursory: it splits the message using the "YYYY-MM-DD NAME <EMAIL>" > headers, checks each is preceeded by a path starting with "gdb/" and > ending with "/", and checks each is followed by more "NAME <EMAIL>" > lines, blank lines, or lines starting with tab. I don't know how > comprehensive we want to be here as the message should already have > been checked over by the reviewer. Maybe (for now) we also want to check that the same ChangeLog entries appear in the patch? > I've never done anything server-side with git before, so there may > well be things I'm missing here. I was mainly experimenting to see > how difficult this all was :) > > Cheers, > Gary