threads / discuss / 9541

git-svn fetch updating master

Subject: git-svn fetch updating master

## tl;dr

4 messages between Aug 15, 2007 and Aug 16, 2007.

replies: 3people: 2as markdown or json

Mike Hommey· Aug 15, 2007, 18:12 UTC · lore
Hi,

I was wondering why the master branch was hardcoded to be updated in post_fetch_checkout() in git-svn. Why not allow to use another branch ?

Mike
Eric Wong· Aug 16, 2007, 08:03 UTC · re: Mike Hommey · lore

Re: git-svn fetch updating master

Mike Hommey <mh@glandium.org> wrote:
> Hi,
> 
> I was wondering why the master branch was hardcoded to be updated in
> post_fetch_checkout() in git-svn. Why not allow to use another branch ?

It shouldn't update master if it the branch already exists and is a valid ref.

The default for git-clone is to create "master", too, so I wanted git-svn clone behavior to be the same.

-- 
Eric Wong
Mike Hommey· Aug 16, 2007, 08:27 UTC · re: Eric Wong · lore

Re: git-svn fetch updating master

On Thu, Aug 16, 2007 at 01:03:49AM -0700, Eric Wong <normalperson@yhbt.net> wrote:
Show 11 quoted lines
> Mike Hommey <mh@glandium.org> wrote:
> > Hi,
> > 
> > I was wondering why the master branch was hardcoded to be updated in
> > post_fetch_checkout() in git-svn. Why not allow to use another branch ?
> 
> It shouldn't update master if it the branch already exists and is a
> valid ref.
> 
> The default for git-clone is to create "master", too, so I wanted
> git-svn clone behavior to be the same.
git-svn fetch is not only invoqued at cloning time...

My problem is that I (purposely) removed the master branch, so git-svn fetch is creating it again every time I run to update the svn branch...

Mike
Eric Wong· Aug 16, 2007, 09:03 UTC · re: Mike Hommey · lore

Re: git-svn fetch updating master

Mike Hommey <mh@glandium.org> wrote:
Show 17 quoted lines
> On Thu, Aug 16, 2007 at 01:03:49AM -0700, Eric Wong <normalperson@yhbt.net> wrote:
> > Mike Hommey <mh@glandium.org> wrote:
> > > Hi,
> > > 
> > > I was wondering why the master branch was hardcoded to be updated in
> > > post_fetch_checkout() in git-svn. Why not allow to use another branch ?
> > 
> > It shouldn't update master if it the branch already exists and is a
> > valid ref.
> > 
> > The default for git-clone is to create "master", too, so I wanted
> > git-svn clone behavior to be the same.
> 
> git-svn fetch is not only invoqued at cloning time...
> 
> My problem is that I (purposely) removed the master branch, so git-svn fetch
> is creating it again every time I run to update the svn branch...

Ah. The old usage was: git-svn init && git-svn fetch; so it'll create a master branch each time. You can use --no-checkout with fetch to avoid this behavior.

-- 
Eric Wong

← back to recent threads