git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] git-svn: add support for prefixed globs in config

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 30, 2015, 21:37 UTC
Message-ID
<xmqq60zfehyb.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1451470149-14735-1-git-send-email-vleschuk@accesssoftek.com>
Victor Leschuk <vleschuk@gmail.com> writes:
Show 25 quoted lines
> Introduce prefixed globs for branches and tags in git-svn.
> Globs like 'release_*' allow users to avoid long lines in config like:
>
> branches = branches/{release_20,release_21,release_22,...}
>
> Signed-off-by: Victor Leschuk <vleschuk@accesssoftek.com>
> ---
> Changes from v3:
> 	* Wrapped all test preparations in separate test-cases
>
>  Documentation/git-svn.txt        |   5 ++
>  perl/Git/SVN/GlobSpec.pm         |   9 ++-
>  t/t9168-git-svn-prefixed-glob.sh | 142 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 151 insertions(+), 5 deletions(-)
>  create mode 100755 t/t9168-git-svn-prefixed-glob.sh
>
> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
> index 0c0f60b..529cffe 100644
> --- a/Documentation/git-svn.txt
> +++ b/Documentation/git-svn.txt
> @@ -1034,6 +1034,7 @@ 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_*

Hmph, if you are going this route, I wonder if there is a reason to limit yourself only to "prefix". Would allowing something like this:

	branches = branches/pre*post:refs/remotes/project-a/branches/*

i.e., loosening the rule to allow at most one asterisk anywhere on the left hand side of the colon, and require the same number of asterisks as the left hand side has on the right hand side of the colon, be too lax and hurt the users?

Previous: Victor LeschukNext: Eric Wong
Message 2 of 4 in “git-svn: add support for prefixed globs in config”
  1. git-svn: add support for prefixed globs in configVictor Leschuk, Dec 30, 2015
  2. Junio C HamanoDec 30, 2015
  3. Eric WongJan 5, 2016
  4. Victor LeschukJan 10, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.