Skip to content

Instantly share code, notes, and snippets.

View leif81's full-sized avatar

Leif Gruenwoldt leif81

View GitHub Profile
@leif81
leif81 / git_fix_author
Created March 9, 2011 21:50
Written to change the unix name used for a cvs commit to a pretty git name for the user. Implementation borrowed from http://lists.freedesktop.org/archives/portland/2010-October.txt author-conv-file format (same format as git-cvsimport requires):
#!/bin/bash
export $authors_file=author-conv-file
git filter-branch -f --env-filter '
get_name () {
grep "^$1=" "$authors_file" |
sed "s/^.*=\(.*\) <.*>$/\1/"
}