Skip to contentSkip to conversation

git-svn fetch updating master

DISCUSSION Mike Hommey 2 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 4 lines · Mike Hommey

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.

Signature · 1 line
Eric Wong
#2 lore raw
Quoted 11 lines · Eric Wong
Quoted 4 lines · Mike Hommey

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

#3 lore raw
Quoted 10 lines · Mike Hommey
Quoted 9 lines · Eric Wong
Quoted 4 lines · Mike Hommey

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.

Quoted 7 lines
Quoted 2 lines

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.

Signature · 1 line
Eric Wong