I’m currently mirroring an existing SVN repository on Github. For the initial clone I did this:
git svn --authors-prog=fixsvnauthors clone http://closure-compiler.googlecode.com/svn/
To update the repo every hour I do this:
git svn --authors-prog=fixsvnauthors rebase
The fixsvnauthors maps the SVN user names (E-Mail addresses) to Git usernames. My problem is now that this SVN repository seems to have a strange policy for commit messages. Most of them start with an empty line. Github doesn’t like that at all. All commit message summaries are empty which is pretty annoying.
So when there is a nice way to fix the authors during cloning maybe there is also a way to fix commit messages? I simply want to trim the commit messages so they are correctly read by Github. Couldn’t find anything like this in the documentation of git-svn but maybe I missed something. So how can I do this?
I created a Git patch to implement a
--messages-progparameter ingit-svnwhich can be used to specify a program to filter the commit messages while pulling changes from SVN. Works great for me. I sent the patch to the git mailing list but never got any reaction. Well, maybe the patch is useful for someone, so I post it here: