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

git-svn and spaces in branch names

From
BMBrecht Machiels <brecht+gmane@mos6581.org>
Date
Jun 22, 2012, 17:57 UTC
Message-ID
<op.wgbf51qi518yxf@krusty>
Hello,

I believe I have run into a bug in git-svn. I'm trying to clone a large subversion repository. It's layout looks roughly like this:

project/
   1.0/
     branches/
       some_feature
       anotherFeature
     tags/
       1.0 IR1
       1.0 IR2
       merge_tags/
         ...
       daily_builds/
         ...
   1.1/
     ...

I created a custom git-svn configuration to map the branches and tags to git remotes. As the tags dir inside each version dir contains the merge_tags and daily_builds folders, I have manually specified the tags to match:

   branches = 1.0/tags/{1.0 IR1,1.0 IR2}:refs/remotes/tags/1.0/*
   branches = 1.0/tags/daily_builds/*:refs/remotes/daily_builds/1.0/*
   branches = 1.0/tags/merge_tags/*:refs/remotes/merge_tags/1.0/*

The {} operator seems to fail on entries containing spaces. The tags seems to be cloned correctly, however, git-svn chokes on accessing them. I'm not at work now, so I can't paste the exact error, but it included the following error message: fatal: Not a valid object name: 'remotes/tags/1.0/1.0%20IR1'.

I noticed this difference:
     ".git/refs/remotes/tags/1.0/1.0%20IR1" versus
".git/refs/svn/remotes/tags/1.0/1.0 IR1" (space versus HTML entity)
In an attempt to sidestep the issue, I tried the following configuration:
   branches = 1.0/tags/*:refs/remotes/tags/1.0/*

... and additionally using --ignore-paths on the daily_builds and merge_tags paths (I can take care of those later). This approach doesn't result in errors, so the problem must lie with the {} construct.

If any more information is required, I can provide it after the weekend.

Cheers, Brecht

Message 1 of 1 in “git-svn and spaces in branch names”
  1. Brecht MachielsJun 22, 2012

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.