public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: Jason Merrill <jason@redhat.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>,
	Eric Raymond <esr@thyrsus.com>, Jeff Law <law@redhat.com>,
	GCC Development <gcc@gcc.gnu.org>
Subject: Re: Commit messages and the move to git
Date: Wed, 04 Dec 2019 23:52:00 -0000	[thread overview]
Message-ID: <61f83d0b-bc85-3479-3cdd-d56323c033c7@arm.com> (raw)
In-Reply-To: <632176b4-0ff6-1389-1576-138700ea900b@arm.com>

On 02/12/2019 10:54, Richard Earnshaw (lists) wrote:
> On 19/11/2019 14:56, Jason Merrill wrote:
>> On Mon, Nov 18, 2019 at 4:38 PM Richard Earnshaw (lists) <
>> Richard.Earnshaw@arm.com> wrote:
>>
>>> On 18/11/2019 20:53, Jason Merrill wrote:
>>>> On Mon, Nov 18, 2019 at 2:51 PM Segher Boessenkool <
>>>> segher@kernel.crashing.org> wrote:
>>>>
>>>>> On Mon, Nov 18, 2019 at 07:21:22PM +0000, Richard Earnshaw (lists)
>>> wrote:
>>>>>> On 18/11/2019 18:53, Segher Boessenkool wrote:
>>>>>>> PR target/92140: clang vs gcc optimizing with adc/sbb
>>>>>>> PR fortran/91926: assumed rank optional
>>>>>>> PR tree-optimization/91532: [SVE] Redundant predicated store in
>>>>> gcc.target/aarch64/fmla_2.c
>>>>>>> PR tree-optimization/92161: ICE in
>>>>>>> vect_get_vec_def_for_stmt_copy, at
>>>>> tree-vect-stmts.c:1687
>>>>>>> PR tree-optimization/92162: ICE in vect_create_epilog_for_reduction,
>>>>> at tree-vect-loop.c:4252
>>>>>>> PR c++/92015: internal compiler error: in
>>>>>>> cxx_eval_array_reference, at
>>>>> cp/constexpr.c:2568
>>>>>>> PR tree-optimization/92173: ICE in optab_for_tree_code, at
>>>>> optabs-tree.c:81
>>>>>>> PR tree-optimization/92173: ICE in optab_for_tree_code, at
>>>>> optabs-tree.c:81
>>>>>>> PR fortran/92174: runtime error: index 15 out of bounds for type
>>>>> 'gfc_expr *[15]
>>>>>>>
>>>>>>> Most of these aren't helpful at all, and none of these are good
>>>>>>> commit
>>>>>>> summaries.  The PR92173 one actually has identical commit messages
>>> btw,
>>>>>>> huh.  Ah, the second one (r277288) has the wrong changelog, but
>>>>>>> in the
>>>>>>> actual changelog file as well, not something any tool could fix
>>>>>>> up (or
>>>>>>> have we reached the singularity?)
>>>>>>
>>>>>> Identical commits are normally from where the same commit is made to
>>>>>> multiple branches.  It's not uncommon to see this when bugs are
>>>>>> fixed.
>>>>>
>>>>> This is an actual mistake.  The commits are not identical at all, just
>>>>> the commit messages are (and the changelog entries, too).  Not
>>>>> something
>>>>> that happens to ften, but of course I hit it in the first random
>>>>> thing I
>>>>> pick :-)
>>>>>
>>>>>> Ultimately the question here is whether something like the above is
>>> more
>>>>>> or less useful than what we have today, which is summary lines of the
>>>>> form:
>>>>>>
>>>>>> <date> <user> <email>
>>>>>
>>>>> I already said I would prefer things like
>>>>>    Patch related to PR323
>>>>> as the patch subject lines.  No one argues that the current state of
>>>>> affairs is good.  I argue that replacing this with often wrong and
>>>>> irrelevant information isn't the best we can do.
>>>>>
>>>>
>>>> How about using the first line that isn't a ChangeLog date/author line,
>>>> without trying to rewrite/augment it?
>>>>
>>>> Jason
>>>>
>>>
>>> It would certainly be another way of doing it.  Sometimes it would
>>> produce almost the same as an unadulterated PR; sometimes it would
>>> produce something more meaningful and sometimes it would be pretty
>>> useless.  It probably would hit more cases than my current script in
>>> that it wouldn't require the commit to mention a PR in it.
>>>
>>> The main problem is that the first line is often incomplete, and much of
>>> it is also wasted with elements like the full path to a file that is
>>> quite deep in the tree.  Lets take a quick example (the first I found in
>>> the dump I have).
>>>
>>> 1998-12-17  Vladimir N. Makarov  <vmakarov@cygnus.com>
>>>          * config/i60/i960.md (extendqihi2): Fix typo (usage ','
>>> instead of
>>>          ';').
>>> 1998-12-17  Michael Tiemann  <tiemann@axon.cygnus.com>
>>>          * i960.md (extend*, zero_extend*): Don't generate rtl that
>>> looks
>>>          like (subreg:SI (reg:SI N) 0), because it's wrong, and it hides
>>>          optimizations from the combiner.
>>>
>>> Firstly, this example misses a blank line between the author and the
>>> change message itself, which makes distinguishing between this and the
>>> multiple authors case harder.  Secondly, the entry really spans two
>>> lines and cutting it off at the end of the first line would be, well a
>>> bit odd.  We could try to piece things together more, by combining lines
>>> until we find a sentence end ( \.$ or \.\s\s ), and we could also strip
>>> off more of the path components to just leave the name of the file
>>> committed.  For example,
>>>
>>> i960.md (extendqihi2): Fix typo (usage ',' instead of ';').
>>>
>>> That might work better, but obviously it's harder to handle and thus
>>> more likely to create erroneous summaries.
>>>
>>
>> Yep. I don't think we need to worry about getting optimal one-line
>> summaries for ancient commits; something reasonably unique should be
>> plenty.
>>
> 
> Attached is the latest version of my script.  I used (very nearly) this
> to produce a conversion over the weekend and I've uploaded that here:
> 
> https://gitlab.com/rearnsha/gcc-trial-20191130
> 
> Note, that I might blow this away at any time.  IT IS NOT A FINAL
> CONVERSION.
> 
> Some other things to note:
> - there are a number of known issues with the version of reposurgeon
> used for this that are being worked on
>   - emptycommit-* tags - my control script was out-of-date
>   - *deleted* branches - this is being worked on
>   - weird dependencies around merges - this is being worked on
>   - author attributions are sometimes incorrect - reported
> 

I've just pushed a new trial conversion:

https://gitlab.com/rearnsha/gcc-trial2-20191130

The main differences between this and the previous trial are:
- The author attributions should now be fixed, please let me know if you
see any anomalies in this respect.
- the emptycommit-* tags/branches are now gone.
- the 'tags' used for revert and backport now use more gittish style
revert: and backport:
- the log entries for c++ style functions containing :: are now handled
correctly by my summary generation script.

Other issues are still being worked on.

R.

> The main difference between the attached script and the one I used for
> this conversion is that ChangeLog change that contain :: inside a
> function list is now handled correctly, resulting in a number of cases
> that were previously being missed now being correctly handled.
> 
> Choices I made:
> - When a PR is used to derive the summary, I prefix this with 're' (as
> in the Latin 'in re'.
> - long change hunks produce poor summaries.  To reduce the overhead:
>   - path names are removed, leaving just the final file name
>   - multiple files are replaced with [...] after the first filename
>   - similarly, multiple function names are replaced with [...]
>   - very long comments are truncated, preferably at the strongest
>     punctuation mark, but sometimes after key words, such as 'if',
>     'when', 'unless' and a few more.  Ultimately, if the line is
>     still too long, we just break after an arbitrary space.
> - Where possible useful summary lines that appear after an author,
>   attribution are hoisted as a summary.
> - certain key words in otherwise not very useful summary lines are
>   also spotted and used to add [revert] or [backport] annotations to
>   the summary.
> 
> No changes are made to the main commit log, if we add a new summary
> line, the entire original text is kept.
> 
> An example of a summary produced by this is for the commit to r278572,
> where the original log entry is:
> 
> 
>         Backported from mainline
>         2019-08-02  Jakub Jelinek  <jakub@redhat.com>
> 
>         * quadmath.h (M_Eq, M_LOG2Eq, M_LOG10Eq, M_LN2q, M_LN10q, M_PIq,
>         M_PI_2q, M_PI_4q, M_1_PIq, M_2_PIq, M_2_SQRTPIq, M_SQRT2q,
>         M_SQRT1_2q): Use two more decimal places.
> 
> And the script then generates:
> 
> [backport] quadmath.h (M_Eq, [...]): Use two more decimal places.
> 
> as the summary.
> 
> R.

  parent reply	other threads:[~2019-12-04 23:52 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 10:29 Richard Earnshaw (lists)
2019-11-04 12:11 ` Arnaud Charlet
2019-11-04 12:43 ` Martin Jambor
2019-11-04 17:43   ` Segher Boessenkool
2019-11-04 16:04 ` Jeff Law
2019-11-04 16:18   ` Richard Earnshaw (lists)
2019-11-05 15:48   ` Richard Earnshaw
2019-11-07 14:27   ` Eric S. Raymond
2019-11-08 13:43     ` Richard Earnshaw (lists)
2019-11-09  6:01       ` Eric S. Raymond
2019-11-18 15:32         ` Richard Earnshaw (lists)
2019-11-18 15:55           ` Segher Boessenkool
2019-11-18 16:48             ` Richard Earnshaw (lists)
2019-11-18 17:11               ` Segher Boessenkool
     [not found]                 ` <8c32c288-e9e6-b01b-7911-3f186116da85@gmail.com>
2019-11-18 17:24                   ` Nicholas Krause
2019-11-18 17:26                     ` Nicholas Krause
2019-11-18 17:46                       ` Richard Earnshaw (lists)
2019-11-18 17:49                         ` Richard Earnshaw (lists)
2019-11-18 17:55                         ` Nicholas Krause
2019-11-18 18:05                           ` Richard Earnshaw (lists)
2019-11-18 18:24                             ` Joseph Myers
2019-11-19 11:26                               ` Eric S. Raymond
2019-11-19 11:25                             ` Eric S. Raymond
2019-11-19 11:46                               ` Richard Earnshaw (lists)
2019-11-19 19:32                                 ` Eric S. Raymond
2019-11-19 19:47                                   ` Richard Earnshaw (lists)
2019-11-19 19:49                                     ` Richard Earnshaw (lists)
2019-11-19 22:14                                     ` Eric S. Raymond
2019-11-19 22:19                                       ` Richard Earnshaw (lists)
2019-11-21 16:41                                       ` Joseph Myers
2019-11-21 16:52                                         ` Richard Earnshaw (lists)
2019-11-21 18:11                                           ` Eric S. Raymond
2019-11-21 18:09                                         ` Eric S. Raymond
2019-11-21 19:22                                         ` Richard Earnshaw (lists)
2019-11-19 19:43                                 ` Richard Earnshaw (lists)
2019-11-19 22:08                                   ` Eric S. Raymond
2019-11-18 17:38                 ` Richard Earnshaw (lists)
2019-11-18 18:53                   ` Segher Boessenkool
2019-11-18 19:14                     ` Richard Earnshaw (lists)
2019-11-18 19:21                     ` Richard Earnshaw (lists)
2019-11-18 19:44                       ` Segher Boessenkool
2019-11-18 20:53                         ` Jason Merrill
2019-11-18 21:38                           ` Richard Earnshaw (lists)
2019-11-19 14:57                             ` Jason Merrill
2019-11-19 16:31                               ` Segher Boessenkool
2019-11-19 16:47                                 ` Jonathan Wakely
2019-11-19 16:48                                 ` Jason Merrill
2019-11-19 19:36                                   ` Eric S. Raymond
2019-11-19 23:29                                     ` Segher Boessenkool
2019-11-19 23:44                                       ` Joseph Myers
2019-11-19 23:51                                         ` Nicholas Krause
2019-11-20  8:55                                           ` Jonathan Wakely
2019-11-20 14:50                                         ` Szabolcs Nagy
2019-11-20 17:30                                         ` Richard Earnshaw (lists)
2019-11-20  8:58                                       ` Jonathan Wakely
2019-11-20 11:27                                         ` Segher Boessenkool
2019-11-20 11:30                                           ` Richard Earnshaw (lists)
2019-11-20 11:42                                             ` Segher Boessenkool
2019-11-20 14:25                                           ` Jason Merrill
2019-11-20 16:01                                             ` Segher Boessenkool
2019-11-19 16:49                                 ` Richard Earnshaw (lists)
2019-12-02 10:54                               ` Richard Earnshaw (lists)
2019-12-02 15:35                                 ` Segher Boessenkool
2019-12-02 16:19                                   ` Richard Earnshaw (lists)
2019-12-02 17:25                                     ` Segher Boessenkool
2019-12-02 17:47                                       ` Richard Earnshaw (lists)
2019-12-02 18:00                                         ` Segher Boessenkool
2019-12-02 18:11                                           ` Richard Earnshaw (lists)
2019-12-02 18:17                                           ` Eric S. Raymond
2019-12-02 20:24                                       ` Joseph Myers
2019-12-03  0:48                                         ` Segher Boessenkool
2019-12-03  9:44                                           ` Richard Earnshaw (lists)
2019-12-03 10:12                                             ` Richard Earnshaw (lists)
2019-12-02 20:22                                     ` Richard Sandiford
2019-12-04 23:52                                 ` Richard Earnshaw (lists) [this message]
2019-12-05 10:26                                   ` Jonathan Wakely
2019-12-05 10:32                                     ` Jonathan Wakely
2019-12-05 10:36                                       ` Richard Earnshaw (lists)
2019-12-05 10:41                                         ` Jonathan Wakely
2019-12-05 10:54                                           ` Jonathan Wakely
2019-12-05 13:18                                         ` Joseph Myers
2019-12-05 17:10                                           ` Eric S. Raymond
2019-12-05 17:22                                             ` Joseph Myers
2019-12-05 17:45                                               ` Eric S. Raymond
2019-12-05 20:14                                                 ` Joseph Myers
2019-12-05 20:46                                                   ` Joseph Myers
2019-12-05 21:14                                                     ` Eric S. Raymond
2019-12-05 21:13                                                   ` Eric S. Raymond
2019-12-05 15:33                                         ` Eric S. Raymond
2019-12-18 23:43                   ` Joseph Myers
2019-12-19  0:01                     ` Joseph Myers
2019-12-19  9:27                       ` Jonathan Wakely
2019-12-19 11:05                         ` Jonathan Wakely
2019-12-19 11:50                         ` Richard Earnshaw (lists)
2019-12-19 11:58                           ` Richard Earnshaw (lists)
2019-12-19 12:23                           ` Jonathan Wakely
2019-12-19 12:33                             ` Richard Earnshaw (lists)
2019-12-19 12:35                               ` Jonathan Wakely
2019-12-19 12:42                                 ` Richard Earnshaw (lists)
2019-12-19 13:34                                   ` Jonathan Wakely
2019-12-19 16:00                                     ` Joseph Myers
2019-12-19 16:06                                       ` Richard Earnshaw (lists)
2019-12-19 14:29                           ` Joseph Myers
2019-12-19 15:17                             ` Jonathan Wakely
2019-12-19 15:20                               ` Richard Earnshaw (lists)
2019-12-19 15:44                                 ` Jonathan Wakely
2019-12-19 15:47                                   ` Joseph Myers
2019-12-19 15:48                                     ` Jonathan Wakely
2019-12-19 15:48                                   ` Richard Earnshaw (lists)
2019-12-19 15:49                                 ` Joseph Myers
2019-12-19 16:27                                   ` Jonathan Wakely
2019-12-19 16:28                                     ` Jonathan Wakely
2019-12-19 16:33                                     ` Joseph Myers
2019-12-19 16:39                                       ` Jonathan Wakely
2019-12-19 16:43                                         ` Joseph Myers
2019-12-20 20:30                                     ` Joseph Myers
2019-12-20 21:30                                       ` Jonathan Wakely
2019-12-20 21:41                                         ` Joseph Myers
2019-12-20 22:11                                           ` Jonathan Wakely
2019-12-20 22:58                                             ` Joseph Myers
2019-12-20 23:23                                               ` Jonathan Wakely
2019-12-20 23:53                                                 ` Joseph Myers
2019-12-19 11:16                       ` Jakub Jelinek
2019-12-19 15:05                         ` Richard Earnshaw (lists)
2019-11-04 16:19 ` Jonathan Wakely
2019-11-04 16:35   ` Richard Earnshaw (lists)
2019-11-04 17:33   ` Segher Boessenkool
2019-11-04 17:42     ` Joseph Myers
2019-11-04 17:50       ` Segher Boessenkool
2019-11-05 11:07       ` Jonathan Wakely
2019-11-05 11:28         ` Jason Merrill
2019-11-05 14:12           ` Marek Polacek
2019-11-05 21:40             ` Richard Earnshaw (lists)
2019-11-05 14:50           ` David Malcolm
2019-11-05 22:08             ` Segher Boessenkool
2019-11-05 20:16         ` Segher Boessenkool
2019-11-05 21:01           ` Iain Sandoe
2019-11-05  2:51 ` Kewen.Lin
2019-11-05 21:42   ` Richard Earnshaw (lists)

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=61f83d0b-bc85-3479-3cdd-d56323c033c7@arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=esr@thyrsus.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=law@redhat.com \
    --cc=segher@kernel.crashing.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).