{"thread":{"id":"18618","subject":"git-svn stubbornly re-creating branch \"master\"","startedAt":"2009-03-29T17:13:47Z","lastAt":"2009-06-14T21:16:16Z","messageCount":10,"participants":["Marcin Owsiany","Dmitry Potapov","Eric Wong","David Kågedal","Mikael Magnusson","Andreas Ericsson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"109780","messageId":"20090329171347.GA26866@beczulka","threadId":"18618","inReplyTo":null,"subject":"git-svn stubbornly re-creating branch \"master\"","fromName":"Marcin Owsiany","fromEmail":"porridge@debian.org","sentAt":"2009-03-29T17:13:47Z","receivedAt":"2009-03-29T17:13:47Z","isPatch":false,"sender":{"key":"porridge@debian.org","avatar":null},"body":"Hello,\n\nI created my git repository by cloning it with git-svn from an upstream SVN\nrepository. When I did that, a branch \"master\" was created. Afterwards I\nrenamed that branch to \"upstream\". However every time I \"git-svn fetch\", it\nrecreates the \"master\" branch, pointing it at the newest upstream commit.\n\nIdeally, I'd like it to just forget about \"master\" and do the same to my\n\"upstream\" branch. Is it possible?\n\nIf not, then is it at least possible to have it not recreate the \"master\"\nbranch? It clutters my view.\n\n\nHere's a typescript (with git 1:1.5.6.3-1.1ubuntu2):\n\n$ svnadmin create svn-repo\n$ r=`pwd`/svn-repo\n$ svn co file://$r svn\nChecked out revision 0.\n$ (cd svn && echo one >> file && svn add file && svn ci -m one file)\nA         file\nAdding         file\nTransmitting file data .\nCommitted revision 1.\n$ git-svn clone file://$r git\nInitialized empty Git repository in /home/mowsiany/tmp/gs/git/.git/\n        A       file\nr1 = 66e7199fe089b1e626efb5f2f3106189d992d288 (git-svn)\nChecked out HEAD:\n  file:///home/mowsiany/tmp/gs/svn-repo r1\n$ (cd git && git show-ref )\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/master\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn\n$ (cd git && git branch mystuff )\n$ (cd git && git show-ref )\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/master\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn\n$ (cd git && git branch -m master upstream )\n$ (cd git && git show-ref )\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/upstream\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn\n$ (cd svn && echo two >> file  && svn ci -m two file)\nSending        file\nTransmitting file data .\nCommitted revision 2.\n$ (cd git && git-svn fetch  )\n        M       file\nr2 = c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b (git-svn)\n$ (cd git && git show-ref )\nc2f8e7fd146e0e9f1223f20bf3c2105f71632c4b refs/heads/master\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff\n66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/upstream\nc2f8e7fd146e0e9f1223f20bf3c2105f71632c4b refs/remotes/git-svn\n\nAs you can see, \"master\" sprang back to life after the last command.\n\n-- \nMarcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/\nGnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216\n"},{"id":"109782","messageId":"37fcd2780903291252i19bba8ccx9dfb73e763d95b15@mail.gmail.com","threadId":"18618","inReplyTo":"20090329171347.GA26866@beczulka","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2009-03-29T19:52:59Z","receivedAt":"2009-03-29T19:52:59Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany\n<porridge@debian.org> wrote:\n>\n> As you can see, \"master\" sprang back to life after the last command.\n\nIt looks like git-svn does not like a repo without 'master'. It seems\nthe problem was caused by this patch:\nhttp://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f\n\nI have added Eric to CC...\n\nDmitry\n"},{"id":"109793","messageId":"20090329222827.GA32199@dcvr.yhbt.net","threadId":"18618","inReplyTo":"20090329171347.GA26866@beczulka","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-03-29T22:28:27Z","receivedAt":"2009-03-29T22:28:27Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Marcin Owsiany <porridge@debian.org> wrote:\n> Hello,\n> \n> I created my git repository by cloning it with git-svn from an upstream SVN\n> repository. When I did that, a branch \"master\" was created. Afterwards I\n> renamed that branch to \"upstream\". However every time I \"git-svn fetch\", it\n> recreates the \"master\" branch, pointing it at the newest upstream commit.\n> \n> Ideally, I'd like it to just forget about \"master\" and do the same to my\n> \"upstream\" branch. Is it possible?\n> \n> If not, then is it at least possible to have it not recreate the \"master\"\n> branch? It clutters my view.\n\n\"master\" has been a git convention since the earliest days of git and\nit's less confusing to new users following documentation if it always\nexists (and a lot of users' first git experience is with git svn).\n\nWhy not just use \"master\" as one of your branches?  It won't bite you.\n\"git svn fetch\" will never clobber your \"master\" if it already exists.\n\n-- \nEric Wong\n"},{"id":"110274","messageId":"87eiwakohw.fsf@krank.kagedal.org","threadId":"18618","inReplyTo":"20090329222827.GA32199@dcvr.yhbt.net","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2009-04-03T10:42:03Z","receivedAt":"2009-04-03T10:42:03Z","isPatch":false,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Marcin Owsiany <porridge@debian.org> wrote:\n>> Hello,\n>> \n>> I created my git repository by cloning it with git-svn from an upstream SVN\n>> repository. When I did that, a branch \"master\" was created. Afterwards I\n>> renamed that branch to \"upstream\". However every time I \"git-svn fetch\", it\n>> recreates the \"master\" branch, pointing it at the newest upstream commit.\n>> \n>> Ideally, I'd like it to just forget about \"master\" and do the same to my\n>> \"upstream\" branch. Is it possible?\n>> \n>> If not, then is it at least possible to have it not recreate the \"master\"\n>> branch? It clutters my view.\n>\n> \"master\" has been a git convention since the earliest days of git and\n> it's less confusing to new users following documentation if it always\n> exists (and a lot of users' first git experience is with git svn).\n>\n> Why not just use \"master\" as one of your branches?  It won't bite you.\n> \"git svn fetch\" will never clobber your \"master\" if it already exists.\n\nI also find this highly annoying. I use branch names that matches the\nbranches we use in svn. So when working on changes for the svn \"foo\"\nbranch, I have a git branch \"foo\" that is based on \"svn/foo\". And when\nworking on \"bar\" I use a \"bar\" branch and so on. A \"master\" branch has\nno place in my workflow, and I keep deleteing it over and over again.\n\nBut mostly I just ignore it.\n\n-- \nDavid Kågedal\n"},{"id":"110275","messageId":"237967ef0904030357u15ef77f2rb3299b6f6c651404@mail.gmail.com","threadId":"18618","inReplyTo":"37fcd2780903291252i19bba8ccx9dfb73e763d95b15@mail.gmail.com","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2009-04-03T10:57:52Z","receivedAt":"2009-04-03T10:57:52Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"2009/3/29 Dmitry Potapov <dpotapov@gmail.com>:\n> On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany\n> <porridge@debian.org> wrote:\n>>\n>> As you can see, \"master\" sprang back to life after the last command.\n>\n> It looks like git-svn does not like a repo without 'master'. It seems\n> the problem was caused by this patch:\n> http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f\n>\n> I have added Eric to CC...\n\nWhy not just check if HEAD points to a valid commit, rather than\nmaster? It should do the same\nin the newly created repo case, and stop annoying people on updates.\n\n-- \nMikael Magnusson\n"},{"id":"110277","messageId":"20090403122631.GA23635@beczulka","threadId":"18618","inReplyTo":"20090329222827.GA32199@dcvr.yhbt.net","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Marcin Owsiany","fromEmail":"marcin@owsiany.pl","sentAt":"2009-04-03T12:26:31Z","receivedAt":"2009-04-03T12:26:31Z","isPatch":false,"sender":{"key":"marcin@owsiany.pl","avatar":"https://avatars.githubusercontent.com/u/489420?v=4"},"body":"On Sun, Mar 29, 2009 at 03:28:27PM -0700, Eric Wong wrote:\n> Why not just use \"master\" as one of your branches?  It won't bite you.\n\nIt's because I have two main branches in my repository, and none of them\nis really more important ATM. I prefer to use different names.\n\n-- \nMarcin Owsiany <marcin@owsiany.pl>              http://marcin.owsiany.pl/\nGnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216\n \n\"Every program in development at MIT expands until it can read mail.\"\n                                                              -- Unknown\n"},{"id":"115640","messageId":"20090606105501.GA29758@beczulka","threadId":"18618","inReplyTo":"237967ef0904030357u15ef77f2rb3299b6f6c651404@mail.gmail.com","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Marcin Owsiany","fromEmail":"marcin@owsiany.pl","sentAt":"2009-06-06T10:55:01Z","receivedAt":"2009-06-06T10:55:01Z","isPatch":false,"sender":{"key":"marcin@owsiany.pl","avatar":"https://avatars.githubusercontent.com/u/489420?v=4"},"body":"This discussion seems to have stalled...\n\nOn Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote:\n> 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>:\n> > On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany\n> > <porridge@debian.org> wrote:\n> >>\n> >> As you can see, \"master\" sprang back to life after the last command.\n> >\n> > It looks like git-svn does not like a repo without 'master'. It seems\n> > the problem was caused by this patch:\n> > http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f\n> >\n> > I have added Eric to CC...\n> \n> Why not just check if HEAD points to a valid commit, rather than\n> master? It should do the same\n> in the newly created repo case, and stop annoying people on updates.\n\nThere seems to be agreement that while conventions are nice, git should\nnot force branch names on people. Can someone implement Mikael's\nsuggestion?\n\n-- \nMarcin Owsiany <marcin@owsiany.pl>              http://marcin.owsiany.pl/\nGnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216\n \n\"Every program in development at MIT expands until it can read mail.\"\n                                                              -- Unknown\n"},{"id":"116282","messageId":"20090614155205.GC11730@beczulka","threadId":"18618","inReplyTo":"20090606105501.GA29758@beczulka","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Marcin Owsiany","fromEmail":"marcin@owsiany.pl","sentAt":"2009-06-14T15:52:05Z","receivedAt":"2009-06-14T15:52:05Z","isPatch":false,"sender":{"key":"marcin@owsiany.pl","avatar":"https://avatars.githubusercontent.com/u/489420?v=4"},"body":"On Sat, Jun 06, 2009 at 11:55:01AM +0100, Marcin Owsiany wrote:\n> This discussion seems to have stalled...\n> \n> On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote:\n> > 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>:\n> > > On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany\n> > > <porridge@debian.org> wrote:\n> > >>\n> > >> As you can see, \"master\" sprang back to life after the last command.\n> > >\n> > > It looks like git-svn does not like a repo without 'master'. It seems\n> > > the problem was caused by this patch:\n> > > http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f\n> > >\n> > > I have added Eric to CC...\n> > \n> > Why not just check if HEAD points to a valid commit, rather than\n> > master? It should do the same\n> > in the newly created repo case, and stop annoying people on updates.\n> \n> There seems to be agreement that while conventions are nice, git should\n> not force branch names on people. Can someone implement Mikael's\n> suggestion?\n\n[silence]\n\nOK, a different question, then: if I wrote a patch to implement the\nbehaviour described by Mikael, would you consider including it?\n\n-- \nMarcin Owsiany <marcin@owsiany.pl>              http://marcin.owsiany.pl/\nGnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216\n \n\"Every program in development at MIT expands until it can read mail.\"\n                                                              -- Unknown\n"},{"id":"116283","messageId":"4A353486.2060900@op5.se","threadId":"18618","inReplyTo":"20090614155205.GC11730@beczulka","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2009-06-14T17:33:58Z","receivedAt":"2009-06-14T17:33:58Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Marcin Owsiany wrote:\n> On Sat, Jun 06, 2009 at 11:55:01AM +0100, Marcin Owsiany wrote:\n>> This discussion seems to have stalled...\n>>\n>> On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote:\n>>> 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>:\n>>>> On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany\n>>>> <porridge@debian.org> wrote:\n>>>>> As you can see, \"master\" sprang back to life after the last command.\n>>>> It looks like git-svn does not like a repo without 'master'. It seems\n>>>> the problem was caused by this patch:\n>>>> http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f\n>>>>\n>>>> I have added Eric to CC...\n>>> Why not just check if HEAD points to a valid commit, rather than\n>>> master? It should do the same\n>>> in the newly created repo case, and stop annoying people on updates.\n>> There seems to be agreement that while conventions are nice, git should\n>> not force branch names on people. Can someone implement Mikael's\n>> suggestion?\n> \n> [silence]\n> \n> OK, a different question, then: if I wrote a patch to implement the\n> behaviour described by Mikael, would you consider including it?\n> \n\nPatches are always considered, but asking about inclusion before the\ncode is written doesn't really work. If you care about this feature\nand really want it, you should write the patch and submit it to the\nmailing list for discussion. It might get dropped on the floor or it\nmight get accepted, but without you actually showing that you want\nit, nothing at all will happen.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"116293","messageId":"20090614211616.GA29742@beczulka","threadId":"18618","inReplyTo":"4A353486.2060900@op5.se","subject":"Re: git-svn stubbornly re-creating branch \"master\"","fromName":"Marcin Owsiany","fromEmail":"marcin@owsiany.pl","sentAt":"2009-06-14T21:16:16Z","receivedAt":"2009-06-14T21:16:16Z","isPatch":false,"sender":{"key":"marcin@owsiany.pl","avatar":"https://avatars.githubusercontent.com/u/489420?v=4"},"body":"On Sun, Jun 14, 2009 at 07:33:58PM +0200, Andreas Ericsson wrote:\n> Marcin Owsiany wrote:\n>> On Sat, Jun 06, 2009 at 11:55:01AM +0100, Marcin Owsiany wrote:\n>>> This discussion seems to have stalled...\n>>>\n>>> On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote:\n>>>> 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>:\n>>>>> On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany\n>>>>> <porridge@debian.org> wrote:\n>>>>>> As you can see, \"master\" sprang back to life after the last command.\n>>>>> It looks like git-svn does not like a repo without 'master'. It seems\n>>>>> the problem was caused by this patch:\n>>>>> http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f\n>>>>>\n>>>>> I have added Eric to CC...\n>>>> Why not just check if HEAD points to a valid commit, rather than\n>>>> master? It should do the same\n>>>> in the newly created repo case, and stop annoying people on updates.\n>>> There seems to be agreement that while conventions are nice, git should\n>>> not force branch names on people. Can someone implement Mikael's\n>>> suggestion?\n>>\n>> [silence]\n>>\n>> OK, a different question, then: if I wrote a patch to implement the\n>> behaviour described by Mikael, would you consider including it?\n>>\n>\n> Patches are always considered, but asking about inclusion before the\n> code is written doesn't really work. If you care about this feature\n> and really want it, you should write the patch and submit it to the\n> mailing list for discussion. It might get dropped on the floor or it\n> might get accepted, but without you actually showing that you want\n> it, nothing at all will happen.\n\nYes, I understand that. I was more looking for some guidance on whether\nworking in that direction makes sense. I'm still a git newbie :-)\n\n-- \nMarcin Owsiany <marcin@owsiany.pl>              http://marcin.owsiany.pl/\nGnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216\n \n\"Every program in development at MIT expands until it can read mail.\"\n                                                              -- Unknown\n"}]}