I have a Git repository originally imported from Subversion. Parts of the author/committer information are wrong, which is not Git's fault but mostly due to sloppy committing with Subversion.
I would like to use git filter-branch
to rewrite the history of the repository, fixing the committer and author information.
The trouble is... I need to slurp author information out of the commit messages. As far as I can tell, git filter-branch
allows you to filter and alter the author information (with --env-filter
) and/or to filter the commit messages (with --msg-filter
), but not to do both simultaneously, with information shared between the different filters.
So I'm kind of stumped about how to do this... the best I can think of is to do it in multiple passes: first, collect allllll the commit messages, then make a script to go through and filter all the author/committer info. This seems quite inelegant and error-prone, so I'm wondering if anyone else has figured out a do this kind of work more smoothly.