git-svn: loosen config globs limitations

Expand the area of globs applicability for branches and tags
in git-svn. It is now possible to use globs like 'a*e', or 'release_*'.
This allows users to avoid long lines in config like:

	branches = branches/{release_20,release_21,release_22,...}

In favor of:

	branches = branches/release_*

[ew: amended commit message, minor formatting and style fixes]

Signed-off-by: Victor Leschuk <vleschuk@accesssoftek.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
This commit is contained in:
Victor Leschuk
2016-01-11 17:25:58 +03:00
committed by Eric Wong
parent db6696f653
commit e4e5dd94e6
3 changed files with 243 additions and 5 deletions

View File

@ -1034,6 +1034,8 @@ listed below are allowed:
url = http://server.org/svn
fetch = trunk/project-a:refs/remotes/project-a/trunk
branches = branches/*/project-a:refs/remotes/project-a/branches/*
branches = branches/release_*:refs/remotes/project-a/branches/release_*
branches = branches/re*se:refs/remotes/project-a/branches/*
tags = tags/*/project-a:refs/remotes/project-a/tags/*
------------------------------------------------------------------------
@ -1044,6 +1046,16 @@ independent path component (surrounded by '/' or EOL). This
type of configuration is not automatically created by 'init' and
should be manually entered with a text-editor or using 'git config'.
Also note that only one asterisk is allowed per word. For example:
branches = branches/re*se:refs/remotes/project-a/branches/*
will match branches 'release', 'rese', 're123se', however
branches = branches/re*s*e:refs/remotes/project-a/branches/*
will produce an error.
It is also possible to fetch a subset of branches or tags by using a
comma-separated list of names within braces. For example: