git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-svn and branches with spaces

From
Dan Fabulich <dan@fabulich.com>
Date
Feb 20, 2009, 23:26 UTC
Message-ID
<alpine.OSX.1.10.0902201515470.1576@sfimac.local>
As others have noticed, git-svn can't handle branches with spaces.
http://markmail.org/message/r56iyw3vubwbycgt

Turns out that there is a possible workaround: thiago's svn-all-fast-export tool is super super configurable, allowing you to work around evil branch names by modifying your matching rules.

http://repo.or.cz/w/svn-all-fast-export.git
I made rules like this:
match /branches/crazy branch with spaces/
   repository myproject
   branch crazy_branch_with_spaces
end match
match /branches/([^/]+)/
   repository myproject
   branch \1
end match

Since the rules apply in order, the evil branch name matched before the catch-all matcher, fixing my problem.

And it doesn't hurt that svn-all-fast-export is at least an order of magnitude faster than git-svn clone... If you find that git-svn is too slow, I strongly recommend svn-all-fast-export.git for performance alone!

-Dan
Message 1 of 1 in “git-svn and branches with spaces”
  1. Dan FabulichFeb 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.