{"thread":{"id":"14098","subject":"Coming clean, after being stupid and ugly (or: globs and filtering with git-svn)","startedAt":"2008-06-23T13:17:47Z","lastAt":"2008-06-23T13:17:47Z","messageCount":1,"participants":["Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80700","messageId":"g3o7ps$32h$1@ger.gmane.org","threadId":"14098","inReplyTo":null,"subject":"Coming clean, after being stupid and ugly (or: globs and filtering with git-svn)","fromName":"Michael J Gruber","fromEmail":"michaeljgruber+gmane@fastmail.fm","sentAt":"2008-06-23T13:17:47Z","receivedAt":"2008-06-23T13:17:47Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Hi there,\n\nI've been a sinner regarding good repo structures: I lumped a lot of \nstuff into one SVN repo. I blame SVN's clumsy admin commands and URLs \nfor that, of course... Along with my transition to git I want to change \nthis structure.\n\nAt the root of my SVN repo I have directories trunk/A, trunk/B and \ntrunk/C, say; similarly for branches/*/A etc.\n\nI know how to \"git-svn clone -s\" the tree under A so that it becomes an \nindependent git repository (using \"branches = \nbranches/*/A:refs/remotes/*\" etc., i.e: git-svn init, edit config, \ngit-svn fetch).\n\nBut I want the trees under B and C to end up in the same git repository \n(under B and C, of course). I could convert the whole SVN repo and \nremove A afterwards using git-filter-branch, but this changes commit IDs \nand leaves spurious branches, tags and commits which touch the tree \nbelow A only, and would need to be removed also.\n\nIs there any way to tell git-svn to do the filtering? It does some sort \nof filtering already (evaluating the fetch, branches and tags glob \npatterns). I would need something like\n\nbranches/*/{B,C}:refs/remotes/*\n\nor\n\nbranches/*/{B,C}:refs/remotes/*/\\1\n\nto mean: treat only the trees below branches/something/B and \nbranches/something/C and put them into subdirs B resp. C of the same git \nrepo in branch something, for each something there is.\n\nAlternatively: Where in git-svn should I look if I wanted to implement \nsomething like that?\n\nCheers,\nMichael\n\nP.S.: Actually, the tree below A will end up in a tree of smaller repos, \nand in my case I have more than just B and C which should end up in the \nsame repo. The description above is a minimal case.\n"}]}