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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx]
Sent: Tuesday, January 12, 2016 19:16
To: Victor Leschuk
Cc: git@xxxxxxxxxxxxxxx; Victor Leschuk; gitster@xxxxxxxxx
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@xxxxxxxxxxxxxxxx>
Signed-off-by: Eric Wong <normalperson@xxxxxxxx>



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]