On Wednesday, April 22, 2015 at 7:37:32 PM UTC+2, Андрей Турбанов wrote:
> I am trying to clone svn repository.
> This repo has standart svn layout: trunks/branches/tags.
> But there are some *non-project* related tags in tags directory.
> I want to clone with only *my-super-tool-** tags
> What I tried:
> git svn clone --trunk trunk --branches branches --tags tags/my-super-tool-*
> git svn clone -s --ignore-paths=tags/PC_*
> First doesn't work: git-svn is unable to accept mask for tags
> Seconed doesn't work too: git-svn clones this tags anyway
First of all, you're not using regular expressions to express the ignore
paths. Quoting the git-svn man page:
> This allows one to specify a Perl regular expression that
> will cause skipping of all matching paths from checkout from
> SVN. The --ignore-paths option should match for every fetch
> (including automatic fetches due to clone, dcommit, rebase,
> etc) on a given repository.
> config key: svn-remote.<name>.ignore-paths
> If the ignore-paths configuration key is set, and the
> command-line option is also given, both regular expressions will
> be used.
> Skip "doc*" directory for every fetch
> Skip "branches" and "tags" of first level directories
Try using finding some examples of regular expressions used with git-svn,
and try that out. Example:
If there are too many things to exclude, also consider using the
--include-paths option instead.
Is it possible to clone this type of svn repo?
> May be with some hack/workaround (I tried to hack git svn sources, but I'm
> not an expert with perl)?
> Where can I add feature request for ability to use mask/regex for branches
> and tags?
It's been a while since I worked with git-svn, so I can only confirm that
it is non-trivial to ignore paths from being included in the clone like you
want. I believe your case should be possible, but there's always the chance
of bugs, depending on your version of Git, platform, etc etc.
You can also consider just doing a full clone without ignoring, and after
that manually tidy up and delete branches that you don't want to keep.
If no-one here can answer you directly (alas, I lack the time to research
myself), you should ask on the Git developer's mailing list, and please
include mention of similar questions in the past:
Here's are some instructions recommended for those writing to the Git list
for the first time: https://gist.github.com/tfnico/4441562
If all else fails, there are other tools than git-svn that can convert
complicated layouts. See for
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.