{"thread":{"id":"23047","subject":"Make bare repository out of git svn init","startedAt":"2010-03-17T11:45:49Z","lastAt":"2010-03-17T12:58:29Z","messageCount":2,"participants":["Sylvain Rabot","Miklos Vajna"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"136997","messageId":"7fce93be1003170445x4a9d240cv2ca37737d6c7a244@mail.gmail.com","threadId":"23047","inReplyTo":null,"subject":"Make bare repository out of git svn init","fromName":"Sylvain Rabot","fromEmail":"sylvain@abstraction.fr","sentAt":"2010-03-17T11:45:49Z","receivedAt":"2010-03-17T11:45:49Z","isPatch":false,"sender":{"key":"sylvain@abstraction.fr","avatar":"https://avatars.githubusercontent.com/u/153052?v=4"},"body":"Hi,\n\nHere what I did to make a bare repository out of git svn init.\nWith this repo I do not intend to push to the svn repo nor to commit\ninto branches comming from it.\nsvn trunk will become master and is only fetch, not modified nor\nrebased (I did not tried to see if it is working tough).\n\ngit svn init svn://<host>/ \\\n--trunk=<project>/trunk \\\n--branches=<project>/branches \\\n--tags=<project>/tags \\\nproject.git\n\ncd project.git\ncat .git/config | \\\nsed s#:refs\\/remotes\\/trunk#:refs\\/heads\\/master# | \\\nsed s#:refs\\/remotes\\/\\\\*#:refs\\/heads\\/*# | \\\nsed s#:refs\\/remotes\\/tags\\/\\\\*#:refs\\/tags\\/*# | \\\nsed \"s#bare = false#bare = true#\" > .git/config.tmp\nmv .git/config.tmp .git/config\ngit svn fetch\ngit svn gc\ngit gc --aggressive\ncp -R .git/* .\nrm -rf .git\n\nThen I have a cron which does a git svn fetch on this repo every half an hour.\n\nI am interesting if you see things I forgot to do or some use cases\nwhere those modifications would break anything.\n\nRegards.\n\n-- \nSylvain\n"},{"id":"137014","messageId":"20100317125829.GU27414@genesis.frugalware.org","threadId":"23047","inReplyTo":"7fce93be1003170445x4a9d240cv2ca37737d6c7a244@mail.gmail.com","subject":"Re: Make bare repository out of git svn init","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2010-03-17T12:58:29Z","receivedAt":"2010-03-17T12:58:29Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Wed, Mar 17, 2010 at 12:45:49PM +0100, Sylvain Rabot <sylvain@abstraction.fr> wrote:\n> I am interesting if you see things I forgot to do or some use cases\n> where those modifications would break anything.\n\nThis is what girocco does:\n\nhttp://repo.or.cz/w/girocco.git/blob/HEAD:/taskd/clone.sh#l25\n\nSo it's not necessary to use a tmp non-bare repo as an intermediate\nstep.\n"}]}