On 2013.04.14 at 11:09 +0300, Kalle Olavi Niemitalo wrote:
> Markus Trippelsdorf <[email protected]> writes:
> 
> > To fix all previous git commits on the mirror one may use the attached
> > git-svn-fix-author script.
> 
> Alternatively, you could reformat gcc_authors as a mailmap file
> and tell Git to use that when displaying the commits.  It would
> avoid having to edit the history, and the email addresses would
> be easy to update later.
> 
> Using a mailmap file in git log used to require writing custom
> format strings, and I'm not sure it was even possible to get the
> commit message indented in the usual way.  It seems Git v1.8.2
> has added git log --use-mailmap to make this easier.

Yes, this works only with git v.1.8.2 and later and has several
drawbacks. The git clients (gitk, etc.) don't know about this new option
and still display the mangled addresses. And the format of the .mailmap
file is more complicated than that of svn.authorsfile, e.g.:
 Steven Bosscher <[email protected]> steven 
<steven@138bc75d-0d04-0410-961f-82ee72b054a4>

Yet another alternative would be to leave the git history as is and
simply switch on the svn.authorsprog feature sometime:
 git config svn.authorsprog /var/tmp/git-svn-fix-author-prog

The git-svn-fix-author-prog script (attached) takes an svn-username as
input and outputs the corresponding name and email-address. If no match
is found it generates a generic "$svnuser <[email protected]>"
output. This has the advantage that "git svn" could never fail.

(an updated gcc_authors file is also attached)

-- 
Markus
#!/bin/bash

authors_file="/var/tmp/gcc_authors"

get_name () {
  grep -m1 "^$1" $authors_file |
  sed "s/^.*=\(.*\) <.*>$/\1/"
}

get_email () {
  grep -m1 "^$1" $authors_file |
  sed "s/^.*=.* <\(.*\)>$/\1/"
}

name=$(get_name $1)
mail=$(get_email $1)

if [ -n "$name" ] && [ -n "$mail" ]; then
  echo "$name <$mail>"
else
  echo "$1 <[email protected]>" 
fi
3dw4rd = Edward Smith-Rowland <[email protected]>
aaronavay62 = Aaron W. LaFramboise <[email protected]>
aaw = Ollie Wild <[email protected]>
abel = Andrey Belevantsev <[email protected]>
adam = Adam Megacz <[email protected]>
aesok = Anatoly Sokolov <[email protected]>
aj = Andreas Jaeger <[email protected]>
ak = Andi Kleen  <[email protected]>
aldyh = Aldy Hernandez <[email protected]>
amacleod = Andrew MacLeod <[email protected]>
amker = Amker Cheng <[email protected]>
amodra = Alan Modra <[email protected]>
amonakov = Alexander Monakov <[email protected]>
ams = Andrew Stubbs <[email protected]>
amylaar = Jorn Wolfgang Rennecke <[email protected]>
andi = Andi Kleen <[email protected]>
andrea.bona = Andrea Bona <[email protected]>
andrea.ornstein = Andrea Ornstein <[email protected]>
andreast = Andreas Tobler <[email protected]>
andrew = Andrew Jenner <[email protected]>
ansgar = Ansgar Esztermann <[email protected]>
antoniu.pop = Antoniu Pop <[email protected]>
aoliva = Alexandre Oliva <aolivaredhat.com>
aph = Andrew Haley <[email protected]>
asutton = Andrew Sutton <[email protected]>
austern = Matt Austern <[email protected]>
avr = Georg-Johann Lay <[email protected]>
ayers = David Ayers <[email protected]>
baldrick = Duncan Sands <[email protected]>
bangerth = Wolfgang Bangerth <[email protected]>
bbooth = Brian Booth <[email protected]>
bdavis = Bud Davis <[email protected]>
belagod = Tejas Belagod <[email protected]>
benoit.dupont-de-dinechin = Benoit Dupont de Dinechin 
<[email protected]>
bergner = Peter Bergner <[email protected]>
bernds = Bernd Schmidt <[email protected]>
bernie = Bernardo Innocenti <[email protected]>
billingd = David Billinghurst <[email protected]>
bin.cheng = Bin Cheng <[email protected]>
bje = Ben Elliston <[email protected]>
bkorb = Bruce Korb <[email protected]>
bkoz = Benjamin Kosnik <[email protected]>
bmei = Bingfeng Mei <[email protected]>
bonzini = Paolo Bonzini <[email protected]>
bosch = Geert Bosch <[email protected]>
bothner = Per Bothner <[email protected]>
bowdidge = Robert Bowdidge <[email protected]>
brendan = Brendan Kehoe <[email protected]>
brobecker = Joel Brobecker <[email protected]>
brolley = Dave Brolley <[email protected]>
brooks.moses = Brooks Moses <[email protected]>
bryce = Bryce McKinlay <[email protected]>
bstarynk = Basile Starynkevitch <[email protected]>
burnus = Tobias Burnus <[email protected]>
bviyer = Balaji V. Iyer  <[email protected]>
bwilson = Bob Wilson <[email protected]>
cagney = Andrew Cagney <[email protected]>
canqun = Canqun Yang <[email protected]>
carlo = Carlo Wood <[email protected]>
carlos = Carlos O'Donell <[email protected]>
carrot = Wei Guozhi <[email protected]>
ccc94453 = Rask Ingemann Lambertsen <[email protected]>
cchavva = Chandra Chavva <[email protected]>
ccorn = Christian Cornelssen <[email protected]>
ccoutant = Cary Coutant <[email protected]>
cfairles = Chris Fairles <[email protected]>
cgd = Chris Demetriou <[email protected]>
cgf = Christopher Faylor <[email protected]>
changpeng.fang = Changpeng Fang <[email protected]>
charlet = Arnaud Charlet <[email protected]>
chertykov = Denis Chertykov <[email protected]>
chrbr = Christian Bruel <[email protected]>
clm = Catherine Moore <[email protected]>
cltang = Chung-Lin Tang <[email protected]>
config-patches = Ben Elliston <[email protected]>
corsepiu = Ralf Corsepius <[email protected]>
crowl = Lawrence Crowl <[email protected]>
ctice = Caroline Tice <[email protected]>
cyon = Christophe Lyon <[email protected]>
daney = David Daney <[email protected]>
danglin = John David Anglin <[email protected]>
dann = Dan Nicolaescu <[email protected]>
dannysmith = Danny Smith [email protected]>
dant = Daniel Towner <[email protected]>
dave.anglin = John David Anglin <[email protected]>
davek = Dave Korn <[email protected]>
davem = David S. Miller <[email protected]>
davidu = David Ung <[email protected]>
davidxl = Xinliang David Li <[email protected]>
david.yuste = David Yuste <[email protected]>
dberlin = Daniel Berlin <[email protected]>
dcarrera = Daniel Carrera <[email protected]>
d = Daniel Kraft <[email protected]>
dehao = Dehao Chen <[email protected]>
devans = Doug Evans <[email protected]>
dewar = Robert Dewar <[email protected]>
dhazeghi = Dara Hazeghi <[email protected]>
dj = DJ Delorie <[email protected]>
dje.gcc = David Edelsohn <[email protected]>
dnovillo = Diego Novillo <[email protected]>
dodji = Dodji Seketeli <[email protected]>
doko = Matthias Klose <[email protected]>
dorit = Dorit Nuzman <[email protected]>
doug.gregor = Doug Gregor <[email protected]>
dougkwan = Doug Kwan <[email protected]>
dpatel = Devang Patel <[email protected]>
drepper = Ulrich Drepper <[email protected]>
drow = Daniel Jacobowitz <[email protected]>
dvyukov = Dmitry Vyukov <[email protected]>
eager = Michael Eager <[email protected]>
ebotcazou = Eric Botcazou <[email protected]>
echristo = Eric Christopher <[email protected]>
edmar = Edmar Wienskoski <[email protected]>
eedelmann = Erik Edelmann <[email protected]>
ehrhardt = Christian Ehrhardt <[email protected]>
emsr = Edward Smith-Rowland <[email protected]>
eraman = Easwaran Raman <[email protected]>
eres = Revital Eres <[email protected]>
ericb = Eric Blake <[email protected]>
eric.weddington = Eric Weddington <[email protected]>
erven.rohou = Erven Rohou <[email protected]>
espie = Marc Espie <[email protected]>
espindola = Rafael ?vila de Esp?ndola <[email protected]>
fabien = Fabien Ch?ne <[email protected]>
falk = Falk Hueffner <[email protected]>
fche = Frank Ch. Eigler <[email protected]>
fdumont = Fran?ois Dumont <[email protected]>
fengwang = Feng Wang <[email protected]>
fitzsim = Thomas Fitzsimmons <[email protected]>
fjahanian = Fariborz Jahanian <[email protected]>
fjh = Fergus Henderson <[email protected]>
ford = Brian Ford <[email protected]>
franke.daniel = Daniel Franke <[email protected]>
franz.sirl-kernel = Franz Sirl <[email protected]>
froydnj = Nathan Froyd <[email protected]>
fu = Chao-ying Fu <[email protected]>
fw = Florian Weimer <[email protected]>
fxcoudert = Fran?ois-Xavier Coudert <[email protected]>
gabriele.svelto = Gabriele Svelto <[email protected]>
gandalf = Andrew John Hughes <[email protected]>
gary = Gary Funck <[email protected]>
gccadmin = gccadmin <[email protected]>
gchare = Gabriel Charette <[email protected]>
gdr = Gabriel Dos Reis <[email protected]>
geoffk = Geoffrey Keating <[email protected]>
george = George Helffrich <[email protected]>
gerald = Gerald Pfeifer <[email protected]>
gganesh = Gopalasubramanian Ganesh <[email protected]>
ghazi = Kaveh Ghazi <[email protected]>
gingell = Matthew Gingell <[email protected]>
gingold = Tristan Gingold <[email protected]>
giovannibajo = Giovanni Bajo <[email protected]>
gjl = Georg-Johann Lay <[email protected]>
gkm = Greg McGary <[email protected]>
glisse = Marc Glisse <[email protected]>
gnustuff = Mohan Embar <[email protected]>
grahams = Graham Stott <[email protected]>
graydon = Graydon Hoare <[email protected]>
green = Anthony Green <[email protected]>
gretay = Greta Yorsh <[email protected]>
greta.yorsh = Greta Yorsh <[email protected]>
grosser = Tobias Grosser <[email protected]>
hagog = Mostafa Hagog <[email protected]>
hainque = Olivier Hainque <[email protected]>
hariharan.gcc = Hariharan Sandanagobalane <[email protected]>
harsha.jagasia = Harsha Jagasia <[email protected]>
harshit = Harshit Chopra <[email protected]>
hboehm = Hans Boehm <[email protected]>
hiller = Matthew Hiller <[email protected]>
hjl.tools = H.J. Lu <[email protected]>
hpenner = Hartmut Penner <[email protected]>
hp = Hans-Peter Nilsson <[email protected]>
hubicka = Jan Hubicka <[email protected]>
hutchinsonandy = Andy Hutchinson <[email protected]>
iain = Iain Sandoe <[email protected]>
ian.bolton = Ian Dall <[email protected]>
ian = Ian Lance Taylor <[email protected]>
ibolton = Ian Bolton <[email protected]>
irar = Ira Rosen <[email protected]>
jakub = Jakub Jelinek <[email protected]>
jamborm = Martin Jambor <[email protected]>
janisjo = Jan Kratochvil <[email protected]>
jan.kratochvil = Jan Sjodin <[email protected]>
jan.sjodin = Janis Johnson <[email protected]>
janus = Janus Weil <[email protected]>
jason = Jason Merrill <[email protected]>
jasonwucj = Chung-Ju Wu <[email protected]>
jayant.sonar = Jayant Sonar <[email protected]>
jbeulich = Janne Blomqvist <[email protected]>
jbglaw = Jan-Benedict Glaw <[email protected]>
jb = Jan Beulich <[email protected]>
jconner = Josh Conner <[email protected]>
jdennett = James Dennett <[email protected]>
jfreeman08 = John Freeman <[email protected]>
jgreenhalgh = James Greenhalgh <[email protected]>
jgrimm2 = Jon Grimm <[email protected]>
jh = Jan Hubicka <[email protected]>
jiangning.liu = Jiangning Liu <[email protected]>
jiez = Jie Zhang <[email protected]>
jim = Jim Meyering <[email protected]>
jkj = Kean Johnston <[email protected]>
jknaggs = Jeff Knaggs <[email protected]>
jle = Jason Eckhardt <[email protected]>
jlquinn = Jerry Quinn <[email protected]>
joel = Joel Sherrill <[email protected]>
joern.rennecke = Joern Rennecke <[email protected]>
john = John Wehle <[email protected]>
jon = Jon Beniston <[email protected]>
jonz = Jon Ziegler <[email protected]>
joseph = Joseph Myers <[email protected]>
jsm28 = Joseph Myers <[email protected]>
jsturm = Jeff Sturm <[email protected]>
jules = Julian Brown <[email protected]>
jvdelisle = Jerry DeLisle <[email protected]>
jwlemke = James Lemke <[email protected]>
jyasskin = Jeffrey Yasskin <[email protected]>
jye2 = Joey Ye <[email protected]>
jzhang918 = Jie Zhang <[email protected]>
kargl = Steven G. Kargl <[email protected]>
kaushik.phatak = Kaushik Phatak <[email protected]>
kazu = Kazu Hirata <[email protected]>
kcc = Kostya Serebryany <[email protected]>
kcook = R. Kelley Cook <[email protected]>
kenner = Richard Kenner <[email protected]>
kevinb = Kevin Williams <[email protected]>
kevin.williams = Kevin Buettner <[email protected]>
kirill.yuakhin = Kirill Yukhin <[email protected]>
kkojima = Kaz Kojima <[email protected]>
konrad.trifunovic = Konrad Trifunovic <[email protected]>
kraai = Matt Kraai <[email protected]>
krab = Kresten Krab Thorup <[email protected]>
krebbel = Andreas Krebbel <[email protected]>
krister.walfridsson = Kris Van Hees <[email protected]>
kris.van.hees = Krister Walfridsson <[email protected]>
ktietz = Kai Tietz <[email protected]>
ktkachovv = Kyrylo Tkachov <[email protected]>
kuba = Jakub Staszak <[email protected]>
kyukhin = Kirill Yukhin <[email protected]>
langton2 = Asher Langton <[email protected]>
laurent = Laurent Guerby <[email protected]>
laurynas.biveinis = Laurynas Biveinis <[email protected]>
law = Jeff Law <[email protected]>
lcwu = Le-Chun Wu <[email protected]>
lerdsuwa = Kriang Lerdsuwanakij <[email protected]>
liqin.gcc = Chen Liqin <[email protected]>
ljrittle = Loren J. Rittle <[email protected]>
lmillward = Lee Millward <[email protected]>
loewis = Martin v. L?wis <[email protected]>
loki = Gabor Loki <[email protected]>
luisgpm = Luis Machado <[email protected]>
macro = Maciej W. Rozycki <[email protected]>
manu = Manuel L?pez-Ib??ez <[email protected]>
marc.glisse = Marc Glisse <[email protected]>
mark = Mark Wielaard <[email protected]>
matthew.gretton-dann = Matthew Gretton-Dann <[email protected]>
matt = Matt Thomas <[email protected]>
matz = Michael Matz <[email protected]>
meadori = Meador Inge <[email protected]>
meheff = Mark Heffernan <[email protected]>
meissner = Michael Meissner  <[email protected]>
mgadams = Mark G. Adams <[email protected]>
m.hayes = Michael Hayes <[email protected]>
mh = Manfred Hollstein <[email protected]>
mikael.morin = Mikael Morin <[email protected]>
mikestump = Mike Stump <[email protected]>
mingjie.xing = Mingjie Xing <[email protected]>
mjambor = Martin Jambor <[email protected]>
mkoch = Michael Koch <[email protected]>
mkuvyrkov = Maxim Kuvyrkov <[email protected]>
mmitchel = Mark Mitchell <[email protected]>
mpolacek = Marek Polacek <[email protected]>
mrs = Mike Stump <[email protected]>
msachs = Matthew Sachs <[email protected]>
mshawcroft = Marcus Shawcroft <[email protected]>
msokolov = Michael Sokolov <[email protected]>
mueller = Dirk Mueller <[email protected]>
mycroft = Charles Hannum <[email protected]>
nathan = Nathan Sidwell <[email protected]>
naveenh = Naveen H.S <[email protected]>
Naveen.Hurugalawadi = Naveen H.S <[email protected]>
neil = Neil ooth <[email protected]>
nemet = Adam Nemet <[email protected]>
nemokingdom = Li Feng <[email protected]>
nenad = Nenad Vukicevic <[email protected]>
neroden = Nathanael Nerode <[email protected]>
nickc = Nick Clifton <[email protected]>
nicola.pero = Nicola Pero <[email protected]>
nico = Nicolas Pitre <[email protected]>
(no author) = No Author <[email protected]>
nvachhar = Neil Vachharajani <[email protected]>
obrien = David O'Brien <[email protected]>
olegendo = Oleg Endo <[email protected]>
ook = Zdenek Dvorak <[email protected]>
paolo.carlini = Paolo Carlini <[email protected]>
pault = Paul Thomas <[email protected]>
pb = Phil Blundell <[email protected]>
pbrook = Paul Brook <[email protected]>
pcg = Marc Lehmann <[email protected]>
pearly.zhao = Shujing Zhao <[email protected]>
phdm = Philippe De Muyter <[email protected]>
phillip.m.jordan = Phillip Jordan <[email protected]>
phython = James A. Morrison <[email protected]>
pinskia = Andrew Pinski <[email protected]>
pkoning = Paul Koning <[email protected]>
pme = Phil Edwards <[email protected]>
pmuldoon = Phil Muldoon <[email protected]>
pogma = Peter O'Gorman <[email protected]>
polacek = Marek Polacek <[email protected]>
Pompapathi.V.Gadad = Pompapathi V Gadad  <[email protected]>
ppluzhnikov = Paul Pluzhnikov <[email protected]>
pronesto = Fernando Pereira <[email protected]>
pthaugen = Philipp Thomas <[email protected]>
pth = Pat Haugen <[email protected]>
quentin.neill.gnu = Quentin Neill <[email protected]>
rakdver = Zdenek Dvorak <[email protected]>
raksit = Raksit Ashok <[email protected]>
Ralf.Wildenhues = Ralf Wildenhues <[email protected]>
ramana.radhakrishnan = Ramana Radhakrishnan <[email protected]>
razya = Razya Ladelsky <[email protected]>
rcl = Ralph Loader <[email protected]>
rdsandiford = Richard Sandiford <[email protected]>
rearnshaw = Richard Earnshaw <[email protected]>
redi = Jonathan Wakely <[email protected]>
reichelt = Volker Reichelt <[email protected]>
rep.dot.nop = Bernhard Reutner-Fischer <[email protected]>
rguenther = Richard Biener <[email protected]>
rmathew = Ranjit Mathew <[email protected]>
rms = Richard Stallman <[email protected]>
rodrigc = Craig Rodrigues <[email protected]>
roland = Roland McGrath <[email protected]>
rolfwr = Rolf Rasmussen <[email protected]>
ro = Rainer Orth <[email protected]>
rsandifo = Richard Sandiford <[email protected]>
rth = Richard Henderson <[email protected]>
rupp = Douglas Rupp <[email protected]>
rus = Silvius Rus <[email protected]>
sabre = Chris Lattner <[email protected]>
saliu = Sa Liu <[email protected]>
sameera.deshpande = Samuel Tardieu <[email protected]>
sam = Sameera Deshpande <[email protected]>
sandra = Sandra Loosemore <[email protected]>
sayle = Roger Sayle <[email protected]>
schwab = Andreas Schwab <[email protected]>
scottb = Scott Robert Ladd <[email protected]>
scott.ladd = Scott Bambrough <[email protected]>
sebastien = Sebastien Bourdeauducq <[email protected]>
segher = Segher Boessenkool <[email protected]>
seongbae.park = Seongbae Park <[email protected]>
sgk = Steven G. Kargl <[email protected]>
shenders = Stuart Henderson <[email protected]>
simartin = Simon Martin <[email protected]>
simonb = Simon Baldwin <[email protected]>
singhai = Sharad Singhai <[email protected]>
singler = Johannes Singler <[email protected]>
sje = Steve Ellcey <[email protected]>
sofiane = Sofiane Naci <[email protected]>
spop = Sebastian Pop <[email protected]>
stanshebs = Stan Shebs <[email protected]>
stcarrez = Stephane Carrez <[email protected]>
stephen.webb = Stephen M. Webb <[email protected]>
sterling = Sterling Augustine <[email protected]>
steven = Steven Bosscher <[email protected]>
stuart = Stuart Hastings <[email protected]>
svein = Svein Seldal <[email protected]>
tbily = Tomas Bily <[email protected]>
tbm = Martin Michlmayr <[email protected]>
tege = Torbjorn Granlund <[email protected]>
tejas.belagod = Tim Josling <[email protected]>
tejohnson = Teresa Johnson <[email protected]>
thierry.lafage = Thierry Lafage <[email protected]>
thomas = Thomas Schwinge <[email protected]>
thorpej = Jason Thorpe <[email protected]>
ths = Thiemo Seufer <[email protected]>
tiloschwarz = Tilo Schwarz <[email protected]>
tkoenig = Thomas K?nig <[email protected]>
tlaurenzo = Terry Laurenzo <[email protected]>
tmsriram = Sriraman Tallam <[email protected]>
tneumann = Thomas Neumann <[email protected]>
tobias.schlueter = Tobias Schl?ter <[email protected]>
tom = Tom de Vries <[email protected]>
toon = Toon Moene <[email protected]>
trevor_smigiel = Trevor Smigiel <[email protected]>
trix = Tom Rix <[email protected]>
tromey = Tom Tromey <[email protected]>
ubizjak = Uros Bizjak <[email protected]>
uros = Uros Bizjak <[email protected]>
uweigand = Ulrich Weigand <[email protected]>
vekumar = Venkataramanan Kumar <[email protected]>
victork = Victor Kaplansky <[email protected]>
vladimir = Vladimir Prus <[email protected]>
vmakarov = Vladimir Makarov <[email protected]>
vries = Tom de Vries <[email protected]>
walt = Walter Lee <[email protected]>
wcohen = William Cohen <[email protected]>
wilson = Jim Wilson <[email protected]>
wmi = Wei Mi <[email protected]>
wschmidt = William Schmidt  <[email protected]>
xguo = Xuepeng Guo <[email protected]>
yao = Yao Qi <[email protected]>
yufeng.zhang = Yufeng Zhang <[email protected]>
zackw = Zack Weinberg <[email protected]>
zadeck = Kenneth Zadeck <[email protected]>
zaks = Ayal Zaks <[email protected]>
ziga.mahkovec = Ziga Mahkovec <[email protected]>
zippel = Roman Zippel <[email protected]>
zlaski = Ziemowit Laski <[email protected]>
zlomek = Josef Zlomek <[email protected]>

Reply via email to