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

Re: [PATCH] git-svn: loosen config globs limitations

From
EWEric Wong <normalperson@yhbt.net>
Date
Jan 13, 2016, 03:16 UTC
Message-ID
<20160113031601.GA28224@dcvr.yhbt.net>
In-Reply-To
<1452522358-16943-1-git-send-email-vleschuk@accesssoftek.com>

Thanks, I made a minor cleanup and applied with --whitespace=fix to remove spaces from indentation.

--- a/perl/Git/SVN/GlobSpec.pm
+++ b/perl/Git/SVN/GlobSpec.pm
@@ -15,8 +15,10 @@ sub new {
 			 $part !~ /^\{[^{}]+\}/) {
 			die "Invalid pattern in '$glob': $part\n";
 		}
-		my $nstars = $part =~ tr/\*//;
-		die "Only one '*' is allowed in a pattern: '$part'\n" if $nstars > 1;
+		my $nstars = $part =~ tr/*//;
+		if ($nstars > 1) {
+			die "Only one '*' is allowed in a pattern: '$part'\n";
+		}
 		if ($part =~ /(.*)\*(.*)/) {
 			die $die_msg if $state eq "right";
 			my ($l, $r) = ($1, $2);

So I'll push out with the following commit message:

Subject: [PATCH] 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>



I also noticed the "Only one set of wildcard directories" error
message is unnecessary long and "wildcard directories" should
probably be shortened to "wildcards" to avoid wrapping in a terminal.
That will probably be a separate patch for me.
Previous: Victor LeschukNext: Victor Leschuk
Message 2 of 10 in “git-svn: loosen config globs limitations”
  1. git-svn: loosen config globs limitationsVictor Leschuk, Jan 11, 2016
  2. Eric WongJan 13, 2016
  3. Victor LeschukJan 13, 2016
  4. Junio C HamanoJan 13, 2016
  5. Eric WongJan 13, 2016
  6. git-svn: shorten glob error messageEric Wong, Jan 14, 2016
  7. Junio C HamanoJan 14, 2016
  8. Victor LeschukJan 22, 2016
  9. Eric WongJan 27, 2016
  10. Junio C HamanoJan 27, 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.