* git-svn stubbornly re-creating branch "master"
@ 2009-03-29 17:13 Marcin Owsiany
2009-03-29 19:52 ` Dmitry Potapov
2009-03-29 22:28 ` Eric Wong
0 siblings, 2 replies; 10+ messages in thread
From: Marcin Owsiany @ 2009-03-29 17:13 UTC (permalink / raw)
To: git
Hello,
I created my git repository by cloning it with git-svn from an upstream SVN
repository. When I did that, a branch "master" was created. Afterwards I
renamed that branch to "upstream". However every time I "git-svn fetch", it
recreates the "master" branch, pointing it at the newest upstream commit.
Ideally, I'd like it to just forget about "master" and do the same to my
"upstream" branch. Is it possible?
If not, then is it at least possible to have it not recreate the "master"
branch? It clutters my view.
Here's a typescript (with git 1:1.5.6.3-1.1ubuntu2):
$ svnadmin create svn-repo
$ r=`pwd`/svn-repo
$ svn co file://$r svn
Checked out revision 0.
$ (cd svn && echo one >> file && svn add file && svn ci -m one file)
A file
Adding file
Transmitting file data .
Committed revision 1.
$ git-svn clone file://$r git
Initialized empty Git repository in /home/mowsiany/tmp/gs/git/.git/
A file
r1 = 66e7199fe089b1e626efb5f2f3106189d992d288 (git-svn)
Checked out HEAD:
file:///home/mowsiany/tmp/gs/svn-repo r1
$ (cd git && git show-ref )
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/master
66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn
$ (cd git && git branch mystuff )
$ (cd git && git show-ref )
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/master
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff
66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn
$ (cd git && git branch -m master upstream )
$ (cd git && git show-ref )
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/upstream
66e7199fe089b1e626efb5f2f3106189d992d288 refs/remotes/git-svn
$ (cd svn && echo two >> file && svn ci -m two file)
Sending file
Transmitting file data .
Committed revision 2.
$ (cd git && git-svn fetch )
M file
r2 = c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b (git-svn)
$ (cd git && git show-ref )
c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b refs/heads/master
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/mystuff
66e7199fe089b1e626efb5f2f3106189d992d288 refs/heads/upstream
c2f8e7fd146e0e9f1223f20bf3c2105f71632c4b refs/remotes/git-svn
As you can see, "master" sprang back to life after the last command.
--
Marcin Owsiany <porridge@debian.org> http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: git-svn stubbornly re-creating branch "master" 2009-03-29 17:13 git-svn stubbornly re-creating branch "master" Marcin Owsiany @ 2009-03-29 19:52 ` Dmitry Potapov 2009-04-03 10:57 ` Mikael Magnusson 2009-03-29 22:28 ` Eric Wong 1 sibling, 1 reply; 10+ messages in thread From: Dmitry Potapov @ 2009-03-29 19:52 UTC (permalink / raw) To: Marcin Owsiany; +Cc: git, Eric Wong On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany <porridge@debian.org> wrote: > > As you can see, "master" sprang back to life after the last command. It looks like git-svn does not like a repo without 'master'. It seems the problem was caused by this patch: http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f I have added Eric to CC... Dmitry ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-03-29 19:52 ` Dmitry Potapov @ 2009-04-03 10:57 ` Mikael Magnusson 2009-06-06 10:55 ` Marcin Owsiany 0 siblings, 1 reply; 10+ messages in thread From: Mikael Magnusson @ 2009-04-03 10:57 UTC (permalink / raw) To: Dmitry Potapov; +Cc: Marcin Owsiany, git, Eric Wong 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>: > On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany > <porridge@debian.org> wrote: >> >> As you can see, "master" sprang back to life after the last command. > > It looks like git-svn does not like a repo without 'master'. It seems > the problem was caused by this patch: > http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f > > I have added Eric to CC... Why not just check if HEAD points to a valid commit, rather than master? It should do the same in the newly created repo case, and stop annoying people on updates. -- Mikael Magnusson ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-04-03 10:57 ` Mikael Magnusson @ 2009-06-06 10:55 ` Marcin Owsiany 2009-06-14 15:52 ` Marcin Owsiany 0 siblings, 1 reply; 10+ messages in thread From: Marcin Owsiany @ 2009-06-06 10:55 UTC (permalink / raw) To: Mikael Magnusson; +Cc: Dmitry Potapov, git, Eric Wong This discussion seems to have stalled... On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote: > 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>: > > On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany > > <porridge@debian.org> wrote: > >> > >> As you can see, "master" sprang back to life after the last command. > > > > It looks like git-svn does not like a repo without 'master'. It seems > > the problem was caused by this patch: > > http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f > > > > I have added Eric to CC... > > Why not just check if HEAD points to a valid commit, rather than > master? It should do the same > in the newly created repo case, and stop annoying people on updates. There seems to be agreement that while conventions are nice, git should not force branch names on people. Can someone implement Mikael's suggestion? -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-06-06 10:55 ` Marcin Owsiany @ 2009-06-14 15:52 ` Marcin Owsiany 2009-06-14 17:33 ` Andreas Ericsson 0 siblings, 1 reply; 10+ messages in thread From: Marcin Owsiany @ 2009-06-14 15:52 UTC (permalink / raw) To: Mikael Magnusson; +Cc: Dmitry Potapov, git, Eric Wong On Sat, Jun 06, 2009 at 11:55:01AM +0100, Marcin Owsiany wrote: > This discussion seems to have stalled... > > On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote: > > 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>: > > > On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany > > > <porridge@debian.org> wrote: > > >> > > >> As you can see, "master" sprang back to life after the last command. > > > > > > It looks like git-svn does not like a repo without 'master'. It seems > > > the problem was caused by this patch: > > > http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f > > > > > > I have added Eric to CC... > > > > Why not just check if HEAD points to a valid commit, rather than > > master? It should do the same > > in the newly created repo case, and stop annoying people on updates. > > There seems to be agreement that while conventions are nice, git should > not force branch names on people. Can someone implement Mikael's > suggestion? [silence] OK, a different question, then: if I wrote a patch to implement the behaviour described by Mikael, would you consider including it? -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-06-14 15:52 ` Marcin Owsiany @ 2009-06-14 17:33 ` Andreas Ericsson 2009-06-14 21:16 ` Marcin Owsiany 0 siblings, 1 reply; 10+ messages in thread From: Andreas Ericsson @ 2009-06-14 17:33 UTC (permalink / raw) To: Marcin Owsiany; +Cc: Mikael Magnusson, Dmitry Potapov, git, Eric Wong Marcin Owsiany wrote: > On Sat, Jun 06, 2009 at 11:55:01AM +0100, Marcin Owsiany wrote: >> This discussion seems to have stalled... >> >> On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote: >>> 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>: >>>> On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany >>>> <porridge@debian.org> wrote: >>>>> As you can see, "master" sprang back to life after the last command. >>>> It looks like git-svn does not like a repo without 'master'. It seems >>>> the problem was caused by this patch: >>>> http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f >>>> >>>> I have added Eric to CC... >>> Why not just check if HEAD points to a valid commit, rather than >>> master? It should do the same >>> in the newly created repo case, and stop annoying people on updates. >> There seems to be agreement that while conventions are nice, git should >> not force branch names on people. Can someone implement Mikael's >> suggestion? > > [silence] > > OK, a different question, then: if I wrote a patch to implement the > behaviour described by Mikael, would you consider including it? > Patches are always considered, but asking about inclusion before the code is written doesn't really work. If you care about this feature and really want it, you should write the patch and submit it to the mailing list for discussion. It might get dropped on the floor or it might get accepted, but without you actually showing that you want it, nothing at all will happen. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-06-14 17:33 ` Andreas Ericsson @ 2009-06-14 21:16 ` Marcin Owsiany 0 siblings, 0 replies; 10+ messages in thread From: Marcin Owsiany @ 2009-06-14 21:16 UTC (permalink / raw) To: git On Sun, Jun 14, 2009 at 07:33:58PM +0200, Andreas Ericsson wrote: > Marcin Owsiany wrote: >> On Sat, Jun 06, 2009 at 11:55:01AM +0100, Marcin Owsiany wrote: >>> This discussion seems to have stalled... >>> >>> On Fri, Apr 03, 2009 at 12:57:52PM +0200, Mikael Magnusson wrote: >>>> 2009/3/29 Dmitry Potapov <dpotapov@gmail.com>: >>>>> On Sun, Mar 29, 2009 at 18:13:47 +0100, Marcin Owsiany >>>>> <porridge@debian.org> wrote: >>>>>> As you can see, "master" sprang back to life after the last command. >>>>> It looks like git-svn does not like a repo without 'master'. It seems >>>>> the problem was caused by this patch: >>>>> http://git.kernel.org/?p=git/git.git;a=commit;h=1e889ef36c45b5554f7e317493ed3f4f901f8d9f >>>>> >>>>> I have added Eric to CC... >>>> Why not just check if HEAD points to a valid commit, rather than >>>> master? It should do the same >>>> in the newly created repo case, and stop annoying people on updates. >>> There seems to be agreement that while conventions are nice, git should >>> not force branch names on people. Can someone implement Mikael's >>> suggestion? >> >> [silence] >> >> OK, a different question, then: if I wrote a patch to implement the >> behaviour described by Mikael, would you consider including it? >> > > Patches are always considered, but asking about inclusion before the > code is written doesn't really work. If you care about this feature > and really want it, you should write the patch and submit it to the > mailing list for discussion. It might get dropped on the floor or it > might get accepted, but without you actually showing that you want > it, nothing at all will happen. Yes, I understand that. I was more looking for some guidance on whether working in that direction makes sense. I'm still a git newbie :-) -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-03-29 17:13 git-svn stubbornly re-creating branch "master" Marcin Owsiany 2009-03-29 19:52 ` Dmitry Potapov @ 2009-03-29 22:28 ` Eric Wong 2009-04-03 10:42 ` David Kågedal 2009-04-03 12:26 ` Marcin Owsiany 1 sibling, 2 replies; 10+ messages in thread From: Eric Wong @ 2009-03-29 22:28 UTC (permalink / raw) To: Marcin Owsiany; +Cc: git Marcin Owsiany <porridge@debian.org> wrote: > Hello, > > I created my git repository by cloning it with git-svn from an upstream SVN > repository. When I did that, a branch "master" was created. Afterwards I > renamed that branch to "upstream". However every time I "git-svn fetch", it > recreates the "master" branch, pointing it at the newest upstream commit. > > Ideally, I'd like it to just forget about "master" and do the same to my > "upstream" branch. Is it possible? > > If not, then is it at least possible to have it not recreate the "master" > branch? It clutters my view. "master" has been a git convention since the earliest days of git and it's less confusing to new users following documentation if it always exists (and a lot of users' first git experience is with git svn). Why not just use "master" as one of your branches? It won't bite you. "git svn fetch" will never clobber your "master" if it already exists. -- Eric Wong ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-03-29 22:28 ` Eric Wong @ 2009-04-03 10:42 ` David Kågedal 2009-04-03 12:26 ` Marcin Owsiany 1 sibling, 0 replies; 10+ messages in thread From: David Kågedal @ 2009-04-03 10:42 UTC (permalink / raw) To: git; +Cc: Eric Wong, Marcin Owsiany Eric Wong <normalperson@yhbt.net> writes: > Marcin Owsiany <porridge@debian.org> wrote: >> Hello, >> >> I created my git repository by cloning it with git-svn from an upstream SVN >> repository. When I did that, a branch "master" was created. Afterwards I >> renamed that branch to "upstream". However every time I "git-svn fetch", it >> recreates the "master" branch, pointing it at the newest upstream commit. >> >> Ideally, I'd like it to just forget about "master" and do the same to my >> "upstream" branch. Is it possible? >> >> If not, then is it at least possible to have it not recreate the "master" >> branch? It clutters my view. > > "master" has been a git convention since the earliest days of git and > it's less confusing to new users following documentation if it always > exists (and a lot of users' first git experience is with git svn). > > Why not just use "master" as one of your branches? It won't bite you. > "git svn fetch" will never clobber your "master" if it already exists. I also find this highly annoying. I use branch names that matches the branches we use in svn. So when working on changes for the svn "foo" branch, I have a git branch "foo" that is based on "svn/foo". And when working on "bar" I use a "bar" branch and so on. A "master" branch has no place in my workflow, and I keep deleteing it over and over again. But mostly I just ignore it. -- David Kågedal ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: git-svn stubbornly re-creating branch "master" 2009-03-29 22:28 ` Eric Wong 2009-04-03 10:42 ` David Kågedal @ 2009-04-03 12:26 ` Marcin Owsiany 1 sibling, 0 replies; 10+ messages in thread From: Marcin Owsiany @ 2009-04-03 12:26 UTC (permalink / raw) To: Eric Wong; +Cc: git On Sun, Mar 29, 2009 at 03:28:27PM -0700, Eric Wong wrote: > Why not just use "master" as one of your branches? It won't bite you. It's because I have two main branches in my repository, and none of them is really more important ATM. I prefer to use different names. -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-06-14 21:16 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-29 17:13 git-svn stubbornly re-creating branch "master" Marcin Owsiany 2009-03-29 19:52 ` Dmitry Potapov 2009-04-03 10:57 ` Mikael Magnusson 2009-06-06 10:55 ` Marcin Owsiany 2009-06-14 15:52 ` Marcin Owsiany 2009-06-14 17:33 ` Andreas Ericsson 2009-06-14 21:16 ` Marcin Owsiany 2009-03-29 22:28 ` Eric Wong 2009-04-03 10:42 ` David Kågedal 2009-04-03 12:26 ` Marcin Owsiany
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).