contrib/git-svn: allow rebuild to work on non-linear remote heads