I'm also CCing gcc-patches and fortran ML.

Martin

On 5/12/20 11:05 AM, Martin Liška wrote:
Hi.

Thanks to Jakub, we finally set up an experimental environment:
gcc.gnu.org/home/gccadmin/gcc-reposurgeon-8.git

The repository now contains a new pre-commit hook that validates
the git commit format ([1]) and provides a reasonable error message
when violated. The hook is based on [2] and the page also contains
a fuzzy definition of what is supported. Cloning [2], one can also
check what will be added to ChangeLog entries by:

$ ./git_changelog.py /home/marxin/Programming/gcc-reposurgeon-8 
8a37df5e5cb2de8302f9412173103593ec53961e
------ gcc/ChangeLog ------
2020-01-13  Martin Jambor  <mjam...@suse.cz>

     PR ipa/93223
     * ipa-cp.c (devirtualization_time_bonus): Check whether isummary is
     NULL.
------ gcc/testsuite/ChangeLog ------
2020-01-13  Martin Jambor  <mjam...@suse.cz>

     PR ipa/93223
     testsuite/
     * g++.dg/ipa/pr93223.C: New test.

(one needs [3] Python package for that)

We encourage people to test both the hook and the script. We hope we'll cover
majority of the used formats. I also support _not_ using DATESTAMP and committer
name, these can be automatically deduced from a commit. That will simplify 
workflow
as people won't have to adjust a message before pushing.

Unresolved questions:
- format of reverted patches
- what to do with backports

Here I suggest to use native 'git revert XYZ' and 'git cherry-pick -x XYZ'.
Doing that the commit messages will provide link to original commit and the 
script
can later append corresponding 'Backported ..' or 'Reverted' line.

For the possible issues or questions, please open a Github issue at [4].

Thoughts?
Martin

[1] https://github.com/marxin/git-hooks/tree/gcc-changelog
[2] https://github.com/marxin/gcc-changelog
[3] https://gitpython.readthedocs.io/en/stable/intro.html
[4] https://github.com/marxin/gcc-changelog/issues



Reply via email to