From: Korzynski, Aleksander Date: Wed, 23 Mar 2011 12:12:55 GMT Subject: underscore in Subversion branch name Message-ID: <4D89E3C7.6060302@hp.com> Dear Git Support, I'm cloning a Subversion repository to Git. A bug in Git is triggered by an underscore in the name of one of the Subversion branches. I use the following command (note: some names are changed): $ git svn clone https://AAA.FFF.com/svnroot/BBB -s The process dies with the following error (names changed): > Found possible branch point: https://AAA.FFF.com/svnroot/BBB/trunk/CCC => https://AAA.FFF.com/svnroot/BBB/branches/DD_EEEEEEE, 100 > fatal: Not a valid object name refs/remotes/DD EEEEEEE > cat-file commit refs/remotes/DD EEEEEEE: command returned error: 128 Note that in the top line, the name of the branch contains an underscore: "DD_EEEEEE". However, in the middle line, the branch name contains a space: "DD EEEEEE". Apparently, Git at some point translates the underscore in the name of the Subversion branch into a space. I've had a look at the source code and the process dies inside resolve_local_globs() in the git-svn script. A command at the beginning of that subroutine is: command(qw#for-each-ref --format=%(refname) refs/#) When I run the following by hand: $ git for-each-ref --format='%(refname)' refs one of the output lines is: refs/remotes/DD%20EEEEEEE So it has a sanitised space (%20) at that point already, instead of an underscore. Git version: 1.7.1 Best regards, Aleksander Korzynski