Re: Fixing author/email fields in commit messages
- From
- Jon Nelson <jnelson-git@jamponi.net>
- Date
- Feb 19, 2006, 23:34 UTC
- Message-ID
- <Pine.LNX.4.63.0602191729100.6352@gheavc.wnzcbav.cig>
- In-Reply-To
- <43F9005E.30901@gmail.com>
On Mon, 20 Feb 2006, Jacob Kroon wrote:
Show 30 quoted lines
> Jon Nelson wrote: > > > >I modified git-convert-objects to perform just that task. > > >I'll see if I can dig it up (I'm not able to do so right now). > > > > > > > > > >Attached. Notes: > > > >1. it's ugly > >2. it's indented funny > >3. it didn't seem to break anything for me, but no guarantees > >4. it probably smells of elderberries > >5. set your GIT_* environment up properly first or you'll wonder why it > >doesn't work like I did. > > > > > > > Hi Jon, > > I've applied your patch to the latest git sources, and it compiles, but I'm > not quite sure how to > invoke the command. I've setup GIT_* env. variables, and git-convert-objects > needs a sha1 identifier. > I've tried passing "HEAD", and some other commit id's, but they don't seem to > make any difference. > Am I doing things right ? How exactly do I invoke the command to clean up the > commit messages ? > > At least I don't get any error messages.
If I recall properly, it should be sufficient to invoke it with the sha1 of the HEAD branch.
Thus, you could use:
git-convert-objects $(git-rev-list --max-count=1 HEAD)
To do /all/ of the branches:
for branch in $(cat .git/refs/heads/* | sort | uniq); do
git-convert-objects ${branch}
doneIt should work on tags, too, although I only tested on my own git stuff which was converted from cvs.
-- Jon Nelson <jnelson-git@jamponi.net>