RE: [PATCH] git-svn: loosen config globs limitations
- From
- Victor 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.