{"thread":{"id":"26840","subject":"underscore in Subversion branch name","startedAt":"2011-03-23T12:12:55Z","lastAt":"2011-03-23T12:12:55Z","messageCount":1,"participants":["Korzynski, Aleksander"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"164134","messageId":"4D89E3C7.6060302@hp.com","threadId":"26840","inReplyTo":null,"subject":"underscore in Subversion branch name","fromName":"Korzynski, Aleksander","fromEmail":"aleksander.korzynski@hp.com","sentAt":"2011-03-23T12:12:55Z","receivedAt":"2011-03-23T12:12:55Z","isPatch":false,"sender":{"key":"aleksander.korzynski@hp.com","avatar":null},"body":"Dear Git Support,\n\nI'm cloning a Subversion repository to Git. A bug in Git is triggered by \nan underscore in the name of one of the Subversion branches.\n\nI use the following command (note: some names are changed):\n\n$ git svn clone https://AAA.FFF.com/svnroot/BBB -s\n\nThe process dies with the following error (names changed):\n\n> Found possible branch point: https://AAA.FFF.com/svnroot/BBB/trunk/CCC => https://AAA.FFF.com/svnroot/BBB/branches/DD_EEEEEEE, 100\n> fatal: Not a valid object name refs/remotes/DD EEEEEEE\n> cat-file commit refs/remotes/DD EEEEEEE: command returned error: 128\n\nNote that in the top line, the name of the branch contains an \nunderscore: \"DD_EEEEEE\". However, in the middle line, the branch name \ncontains a space: \"DD EEEEEE\". Apparently, Git at some point translates \nthe underscore in the name of the Subversion branch into a space.\n\nI've had a look at the source code and the process dies inside \nresolve_local_globs() in the git-svn script. A command at the beginning \nof that subroutine is:\n\ncommand(qw#for-each-ref --format=%(refname) refs/#)\n\nWhen I run the following by hand:\n\n$ git for-each-ref --format='%(refname)' refs\n\none of the output lines is:\n\nrefs/remotes/DD%20EEEEEEE\n\nSo it has a sanitised space (%20) at that point already, instead of an \nunderscore.\n\nGit version: 1.7.1\n\nBest regards,\nAleksander Korzynski\n"}]}