Skip to content
  • Marcin Owsiany's avatar
    git-svn: don't create master if another head exists · e3bd4dda
    Marcin Owsiany authored
    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: default avatarMarcin Owsiany <marcin@owsiany.pl>
    Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
    e3bd4dda