This is the mail archive of the
mailing list for the GDB project.
Re: ChangeLogs in commit messages
- From: Gary Benson <gbenson at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb at sourceware dot org, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Date: Thu, 14 Aug 2014 14:15:30 +0100
- Subject: Re: ChangeLogs in commit messages
- Authentication-results: sourceware.org; auth=none
- References: <20140814083231 dot GA6283 at blade dot nx> <20140814125224 dot GF4924 at adacore dot com>
Joel Brobecker wrote:
> > 1. With paths and with the date-and-author header:
> > gdb/
> > 2014-07-30 Gary Benson <email@example.com>
> > * btrace.c: Include defs.h.
> > * common/ptid.c: Include defs.h or server.h as appropriate.
> > * nat/mips-linux-watch.c: Likewise.
> > 2. With date-and-author headers but no paths:
> > 2014-08-04 Tom Tromey <firstname.lastname@example.org>
> > * gdb.base/sss-bp-on-user-bp-2.exp: Match "to_resume", not
> > "target_resume".
> > 3. With paths but no date-and-author headers:
> > gdb/ChangeLog:
> > * amd64-windows-tdep.c (amd64_windows_frame_decode_insns):
> > Add debug trace.
> > 4. With no preamble at all:
> > * chew.c (print_stack_level, main): Cast result of pointer
> > difference to match format string.
> > What are people's preferences here? My preference is #1, but I
> > could live with #3. If we come to some kind of concensus on this
> > I'll update the wiki to reflect this.
> #3, since date and author are often redundant with the commit's
> author. And even if not in the same, it's in the ChangeLog entry
> that should be checked in as part of the commit. Also, I feel like
> having those in the CL is an extra source of potential issue (eg:
> if forgot to update the date), and revision logs cannot be fixed
> once the commit has been pushed, whereas dates in ChangeLog entries
My concern with omitting the author-and-date is for commits with
multiple authors, and/or multiple commits that have been squashed
with git-rebase (which uses the date and author of the commit that
was "pick"ed rather than that of other commits that were "squash"ed
or "fixup"ed into it. For example:
Author: Tom Tromey <email@example.com>
Date: Fri Jun 13 09:22:09 2014 -0600
Make gdbserver CORE_ADDR unsigned
gdbserver defines CORE_ADDR to be signed. This seems erroneous to
me; and furthermore likely to cause problems in common/, as it is
different from gdb's definition.
2014-07-24 Tom Tromey <firstname.lastname@example.org>
Gary Benson <email@example.com>
* server.h (CORE_ADDR): Now unsigned.
This commit came from a half-finished branch Tom started back in
January. I picked it up June or so, updated/tidied it a bit and
submitted it for review. It was pushed on July 24 but the date on
the commit is June 13. I think most people use rebase eventually,
so this kind of thing is pretty common. The multiple authors
things is less common but not unique.