taskd/clone: ask git-svn to store branches under svn-origin/heads/* instead of svn...
commit86afd385b5e8972256500aec23a308d2abd78065
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 18 Sep 2010 09:58:53 +0000 (18 13:58 +0400)
committerDaniel Knittl-Frank <knittl89+git@googlemail.com>
Sat, 2 Oct 2010 12:17:37 +0000 (2 14:17 +0200)
tree74e4e6f3f339317f67178db9ee0c7ae132489129
parentf52d4a87bf3e0d3e5144e6df81bf4ec237f33465
taskd/clone: ask git-svn to store branches under svn-origin/heads/* instead of svn-origin/*

The trick originally suggested by Mikls Vajna does the following:

    refs/remotes/svn-origin/heads/*     ->  refs/heads/*
    refs/remotes/svn-origin/trunk       ->  refs/heads/master
    refs/remotes/svn-origin/tags/*      ->  refs/tags/*

The problem is git-svn now stores svn branches under
refs/remotes/svn-origin/* (not refs/remotes/svn-origin/heads/* as we
used to expect), and so the first mapping does nothing, and we end up
without svn branches in refs/heads/ namespace.

So, to avoid the problem let's ask git-svn to put svn branches under
svn-origin/heads/* -- then our mapping will work as expected, and it
will fix girocco problem of not propagating svn branches (except trunk)
to git refs/heads/ namespace.

Note: we can't write ``+refs/remotes/svn-origin/*:refs/heads/*'' in the
mapping instead, because then it will recursively put everything from
under svn-origin/ into refs/heads/ , at least including tags/ .

( Eric, at least it seems a bit unflexible for storing svn branches right under
  $prefix/ -- as you can see for automated git mirroring of svn repos, I
  had to tweak git config by hand... )

Cc: Andrew Steinborn <g33kdyoo@gmail.com>
Cc: Miklos Vajna <vmiklos@frugalware.org>
Cc: Eric Wong <normalperson@yhbt.net>
taskd/clone.sh