public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Smith <paul@mad-scientist.net>
To: gcc@gcc.gnu.org
Subject: Re: Git ChangeLog policy for GCC Testsuite inquiry
Date: Sat, 25 Jan 2020 10:53:00 -0000	[thread overview]
Message-ID: <bd1de829b095c5037804dd162989b8d398ef8b01.camel@mad-scientist.net> (raw)
In-Reply-To: <20200124214533.GB17695@tucnak>

On Fri, 2020-01-24 at 22:45 +0100, Jakub Jelinek wrote:
> > > In my experience the output of git log is a total mess so cannot
> > > replace ChangeLogs.  But we can well decide to drop ChangeLog for
> > > the testsuite.
> > 
> > Well, glibc has moved to extracting them from git, building
> > policies and scripts around that.  I'm pretty sure other
> > significant projecs are also extracting their ChangeLogs from git.
> > 
> > We could do the same, selecting some magic date as the cutover
> > point after which future ChangeLogs are extracted from GIT.  In
> > fact, that's precisely what I'd like to see us do.
> 
> We don't have a tool that can do it, not even get the boilerplate
> right. Yes, mklog helps, but it very often gets stuff wrong.  Not to
> mention that the text what actually changed can't be generated very
> easily.

I don't know if it counts as a significant project, but GNU make has
been doing this for years.

What I did was take the existing ChangeLogs and rename them to
ChangeLog.1 or whatever, then started with a new ChangeLog generated
from scratch from Git messages.

I use the gnulib build-aux/gitlog-to-changelog script to do it.  It
requires a little bit of discipline to get right; in particular you
have to remember that the Git commit message will be indented 8 spaces
in the ChangeLog, so you have to be careful that your commit messages
wrap at char 70 (or less) in your Git commit.

If you have Git hooks you could enforce a bit of formatting; for
example any line not indented by space must be <=70 chars long; this
allows people to use long lines for formatted content if they indent it
with a space or two.

Otherwise, it's the same as writing the ChangeLog and you only have to
do it once.

Just to note, the above script simply transcribes the commit message
into ChangeLog format.  It does NOT try to auto-generate ChangeLog-
style content (files that changed, functions, etc.) from the Git diff
or whatever.

There are a few special tokens you can add to your Git commit message
that get reformated to special changelog tokens like "(tiny change)"
etc.

As mentioned previously, it's very important that the commit message be
provided as part of the code review, and it is very much fair game for
review comments.  This is common practice, and a good idea because bad
commit messages are always a bummer, ChangeLog or not.

  reply	other threads:[~2020-01-24 22:38 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGWvnyktjKVp-T9jrGUt_rmzgaoS0Z5N1OPP9oaOvk0Xehrb_Q@mail.gmail.com>
     [not found] ` <28d80650-26ec-04eb-65af-76151da4e411@redhat.com>
     [not found]   ` <CAGWvny=RM5cPi9VoJOKMoPNvgcybavT0CCcKSowxRNZwfrBqNw@mail.gmail.com>
     [not found]     ` <CADzB+2nLasW5mdFBWFd7xxXRLx8+UMnfXTwOYzU_x4c8=WcQRQ@mail.gmail.com>
2020-01-24 21:36       ` David Edelsohn
2020-01-24 21:45         ` Jeff Law
2020-01-24 22:38           ` Eric Botcazou
2020-01-24 22:39             ` Florian Weimer
2020-01-24 22:56             ` Jeff Law
2020-01-25  9:31               ` Jakub Jelinek
2020-01-25 10:53                 ` Paul Smith [this message]
2020-01-25 14:07                   ` H.J. Lu
2020-02-03 18:55                     ` Richard Sandiford
2020-02-03 20:24                       ` Jeff Law
2020-02-05 21:18                         ` Segher Boessenkool
2020-02-06  8:51                           ` Richard Sandiford
2020-02-06 13:37                             ` Segher Boessenkool
2020-02-06 13:01                           ` Jeff Law
2020-02-06 13:51                             ` Segher Boessenkool
2020-02-06 14:01                               ` Richard Biener
2020-02-06 14:40                                 ` Jonathan Wakely
2020-02-07 18:37                                   ` Tom Tromey
2020-02-07 21:41                                     ` Jason Merrill
2020-02-07 22:34                                       ` Tom Tromey
2020-02-08 16:50                                         ` Segher Boessenkool
2020-02-08 23:55                                           ` Andrew Pinski
2020-02-09 10:08                                             ` Segher Boessenkool
2020-02-10 17:51                                           ` Matthew Malcomson
2020-02-11  0:37                                             ` Segher Boessenkool
2020-02-06 22:25                                 ` Segher Boessenkool
2020-02-07  9:20                                   ` Richard Biener
2020-02-07 10:08                                     ` Jonathan Wakely
2020-02-07 23:17                                       ` Alan Modra
2020-02-08 19:58                                         ` Segher Boessenkool
2020-02-09 10:46                                           ` Jonathan Wakely
2020-02-09 17:49                                             ` Segher Boessenkool
2020-02-07 13:48                                     ` Segher Boessenkool
2020-02-07 13:56                                       ` Richard Earnshaw (lists)
2020-02-07 15:33                                         ` Segher Boessenkool
2020-02-07 15:43                                           ` Richard Earnshaw (lists)
2020-02-07 16:00                                             ` Segher Boessenkool
2020-02-10 13:09                                             ` Richard Biener
2020-02-10 17:27                                   ` Hans-Peter Nilsson
2020-02-06 14:56                             ` Jakub Jelinek
2020-02-06 16:18                               ` Segher Boessenkool
2020-02-06 16:25                                 ` Jakub Jelinek
2020-02-06 18:58                                 ` Jason Merrill
2020-02-06 23:10                                   ` Segher Boessenkool
2020-01-25 22:40               ` Nathan Sidwell
2020-01-26 14:59                 ` Jeff Law
2020-02-03 10:15                   ` Richard Earnshaw (lists)
2020-02-03 13:01                     ` Nathan Sidwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd1de829b095c5037804dd162989b8d398ef8b01.camel@mad-scientist.net \
    --to=paul@mad-scientist.net \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).