# git-svn fetch updating master

4 messages from 2007-08-15 to 2007-08-16. Participants: Mike Hommey, Eric Wong.
Thread: https://gitlist.dev/t/9541

## Mike Hommey, 2007-08-15 18:12

Subject: git-svn fetch updating master
Message-ID: <20070815181228.GA6363@glandium.org>
URL: https://gitlist.dev/e/20070815181228.GA6363%40glandium.org

```
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, 2007-08-16 08:03

Subject: Re: git-svn fetch updating master
Message-ID: <20070816080349.GA16849@muzzle>
URL: https://gitlist.dev/e/20070816080349.GA16849%40muzzle
In-Reply-To: <20070815181228.GA6363@glandium.org>

```
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, 2007-08-16 08:27

Subject: Re: git-svn fetch updating master
Message-ID: <20070816082706.GA29521@glandium.org>
URL: https://gitlist.dev/e/20070816082706.GA29521%40glandium.org
In-Reply-To: <20070816080349.GA16849@muzzle>

```
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...

Mike

```

## Eric Wong, 2007-08-16 09:03

Subject: Re: git-svn fetch updating master
Message-ID: <20070816090327.GC16849@muzzle>
URL: https://gitlist.dev/e/20070816090327.GC16849%40muzzle
In-Reply-To: <20070816082706.GA29521@glandium.org>

```
Mike Hommey <mh@glandium.org> wrote:
> 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

```
