]> git.ipfire.org Git - thirdparty/git.git/commit - git-svn.perl
git-svn: don't create master if another head exists
authorMarcin Owsiany <marcin@owsiany.pl>
Sun, 24 Jun 2012 21:40:05 +0000 (22:40 +0100)
committerEric Wong <normalperson@yhbt.net>
Thu, 19 Jul 2012 08:15:50 +0000 (08:15 +0000)
commite3bd4ddaa9a60fa4e70efdb143b434b440d6cec4
tree4f0be0ffaed198f1275f40b0684792dff6bc0df1
parent31c79549b85c6393be4f40432f5b86ebc097fc7e
git-svn: don't create master if another head exists

git-svn insists on creating the "master" head (unless it exists) on every
"fetch". It is useful that it gets created initially, when no head exists
- users expect this git convention of having a "master" branch on initial
clone.

However creating it when there already is another head does not provide any
value - the ref is never updated, so it just gets stale after a while.  Also,
some users find it annoying that it gets recreated, especially when they would
like the git branch names to follow SVN repository branch names. More
background in http://thread.gmane.org/gmane.comp.version-control.git/115030

Make git-svn skip the "master" creation if HEAD already points at a valid head.
This means "master" does get created on initial "clone" but does not get
recreated once a user deletes it.

Also, make post_fetch_checkout work with any head that is pointed to by HEAD,
not just "master".

Also, use fatal error handling consistent with the rest of the program for
post_fetch_checkout.

Signed-off-by: Marcin Owsiany <marcin@owsiany.pl>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl