2011-10-06 44 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/目錄,當然)。