This is the mail archive of the
mailing list for the GDB project.
Re: ChangeLogs in commit messages
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: Mike Frysinger <vapier at gentoo dot org>, gdb at sourceware dot org, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Date: Fri, 15 Aug 2014 09:08:29 -0700
- 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>
> 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.
> 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 :)
Just looking quickly at the script for the typical mistakes I made
when I first started dabbling into this kind of script:
. The SHA1 is 000[...]0 when creating a new reference
(Eg: creating a new branch). But that's an invalid SHA1
. Same when deleting a reference. the "new rev" is 0.
. I would suggest we do that on all branches except branches
under a specific namespace (thinking "vendor" branches, TBD).
. When creating a new branch, you really don't want to start
checking the entire history again, so you need to find the
branchpoint and use that as the "old rev".
I would like to push again for the format without the date and author
email but the simpler gdb/ChangeLog: instead. The commit already
stores that information (author name and email, committer date),
whereas requiring the user to provide it in the rev log means that
the date needs to be maintained throughout the lifetime of the patch
until that patch gets pushed. Same thing when cherry-picking a patch
from master to a release branch.