Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
334 views
in Technique[技术] by (71.8m points)

git svn - Author not defined when importing SVN repository into Git

I'm trying to import our SVN repository into Git. When I run either this command:

git svn --authors-file=/path/to/authors --trunk=trunk clone https://my-repo/project .

or this command:

svn2git https://my-repo/project --no-minimize-url -v --authors /path/to/authors

Both return this error:

Author: patrick  not defined in /path/to/authors file

..but as far as I can tell, there is nothing wrong with my authors file:

$ grep patrick /path/to/authors
patrick = Patrick <[email protected]>

That error doesn't happen until it gets to revision 8700, so it must be grabbing the other author names correctly.

What could be going on here? Thanks.

question from:https://stackoverflow.com/questions/11037166/author-not-defined-when-importing-svn-repository-into-git

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've had the same issue when trying to execute this on Windows. It turned out that the encoding of the file that I stored the authors in was set to UTF-8 instead of UTF-8 without BOM. As the "with BOM" version adds some additional bytes to the beginning of the file, the first author in the list was never found.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...