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

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

From
VLVictor Leschuk <vleschuk@accesssoftek.com>
Date
Jan 13, 2016, 06:40 UTC
Message-ID
<6AE1604EE3EC5F4296C096518C6B77EE5FF2055FF9@mail.accesssoftek.com>
In-Reply-To
<20160113031601.GA28224@dcvr.yhbt.net>
Thanks a lot Eric,
I agree with all corrections, I also noticed the "wildcard directories" message situation when was creating test for the patch, however didn't want mix up unrelated changes for this patchset.
--
Best Regards,
Victor
________________________________________
From: Eric Wong [normalperson@yhbt.net]
Sent: Tuesday, January 12, 2016 19:16
To: Victor Leschuk
Cc: git@vger.kernel.org; Victor Leschuk; gitster@pobox.com
Subject: Re: [PATCH] git-svn: loosen config globs limitations

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: Eric WongNext: Junio C Hamano
Message 3 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.