This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: ChangeLogs in commit messages
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, Mike Frysinger <vapier at gentoo dot org>, gdb at sourceware dot org
- Date: Fri, 15 Aug 2014 17:27:33 +0200
- Subject: Re: ChangeLogs in commit messages
- Authentication-results: sourceware.org; auth=none
- References: <20140814083231 dot GA6283 at blade dot nx> <6036430 dot RnprRWgZmF at vapier> <20140814131206 dot GA12746 at blade dot nx> <20140814132939 dot GH4924 at adacore dot com> <20140815084819 dot GB30130 at blade dot nx> <20140815121102 dot GB6019 at adacore dot com> <20140815130913 dot GA1954 at blade dot nx> <20140815132816 dot GC6019 at adacore dot com> <20140815150202 dot GA5674 at blade dot nx>
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