Re: [PATCH] Munge ChangeLog-style commit messages, and grab author name and email.
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:18
Carl Worth [off-list ref] writes:
The cairo project has been using ChangeLog-style commit messages, such as: 2006-01-18 Carl Worth [off-list ref] * src/cairo-pdf-surface.c: (cairo_pdf_surface_create_for_stream), (cairo_pdf_surface_create): Fix compilation-breaking typo. This patch recognizes that style and munges it up into: Fix compilation-breaking typo. which results in a much more useful headline within git.
I welcome discussion on this patch, but as its in current shape, it looks a bit too specific to one particular style. I think the one you quoted above is the GNU official style which is used in many projects. I suspect your patch would help people converting other projects as well. Having said that, as you said it yourself, it would make more sense to make a more generalized log munging interface. Even though there might be many different schools of style, hopefully each project consistently sticks to one style. Log messages out of SVN repository tend to have their own styles. We could define a common command line option, say --log-filter, that are available across importers. E.g. git-cvsimport --log-filter=gnu-log-style git-svnimport --log-filter=gnu-log-style 'gnu-log-style' would be the massager you have hardcoded in the patch, but made into a traditional UNIXy filter. We could create contrib/commit-filters directory in git.git repository and ship collections of such log massagers.