2011-10-06 46 views
2

我已经使用git svn clone -A authors.txt ...来克隆svn存储库。 我authors.txt有条目是这样的:当我做“git svn rebase”时,它获取svn作者名称而不是git作者名称

svnid = Firstname Lastname <[email protected]> 

这工作得很好,并在git log作者样子:

Author: Firstname Lastname <[email protected]> 

现在,当我做git svn rebase -A authors.txt新条目的作者是这样的:

Author: svnid <[email protected]> 

我使用“Retroactively Correct Authors with Git SVN?”的接受答案 来修复它,但是在下一个git svn rebase -A authors.txt之后,作者又被摧毁了。

如何才能保留正确的作者姓名?

编辑:我在Windows上显然使用git版本1.7.6.msysgit.0 。

+1

奇怪。我在存储库中设置了'svn.authorsfile',它不仅总是使用它(我从来不会传递-A来重定位),但如果svn用户名不在那里,它甚至会失败,我必须在它继续之前填充它。 –

+0

这就是它应该按照联机帮助页面工作的方式。我也尝试设置'git config svn.authorsfile authors.txt',但它没有改变任何东西。 – bbuser

+1

也许是时候在项目邮件列表上提问。 –

回答

0

svn.authorsfile是一个艺术执照(aka bug)。如果您在$EDITOR打开的.git/config文件,你会看到类似这样的:

[svn-remote "svn"] 
url = https://crosswire.org/svn/sword 
fetch = trunk:refs/remotes/trunk 
branches = branches/*:refs/remotes/* 
tags = tags/*:refs/remotes/tags/* 

添加一行

authorsfile = .git/svn/authors.txt 

为节的最后一行(并把你的authors.txt文件.git/svn/目录,当然)。