Search code examples
gitgit-svn

Git svn clone with author name like "/CN=myname"


I'm trying to switch from svn to git on windows 7 using git svn clone command.

On one of my repository I try this:

git svn clone --stdlayout --no-metadata -A users.txt --username=/CN=john https://path/to/my/repo ./

Here is my users.txt file:

/CN=john = John Doe <john.doe@myself.com>

When I git svn clone nothing was displayed just like if everything was ok but no file were cloned. So in C:/Users/John/.suversion/servers I've set neon-debug-mask = 256 to display log errors.

My error is now displayed: Author: /CN=john not defined in users.txt file so I think since there is an equal in my username the git clone command can't properly parse the datas.

I've tried escaping /CN\=john and quoting '/CN=john' "/CN=john" but nothing seems to work.

Does anyone have an idea for the good way to handle this?

Thank you


Solution

  • I've finally found a solution by not using users.txt.

    First I do a git svn clone -s https://path/to/my/repo ./ which clone every files from the repository.

    Now if I do a git log I've got ugly name and mails for every users and I want to clean that. I've simply used this gist which does a git filter-branch --env-filter and search & replace authors and mails by the one you provide in the gist.

    Beware of this solution because it has to crawl each commit in your repository and you have to launch the script for each branch of your repository.

    Hope it helps!