public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt•net>
To: Victor Leschuk <vleschuk@gmail•com>
Cc: git@vger•kernel.org, vleschuk@accesssoftek•com, gitster@pobox•com
Subject: Re: [PATCH] git-svn: loosen config globs limitations
Date: Wed, 13 Jan 2016 03:16:01 +0000	[thread overview]
Message-ID: <20160113031601.GA28224@dcvr.yhbt.net> (raw)
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.

  reply	other threads:[~2016-01-13  3:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 14:25 [PATCH] git-svn: loosen config globs limitations Victor Leschuk
2016-01-13  3:16 ` Eric Wong [this message]
2016-01-13  6:40   ` Victor Leschuk
2016-01-13 18:45   ` Junio C Hamano
2016-01-13 19:26     ` Eric Wong
2016-01-14  4:07   ` [PATCH] git-svn: shorten glob error message Eric Wong
2016-01-14 18:15     ` Junio C Hamano
2016-01-22 16:07       ` Victor Leschuk
2016-01-27  2:54       ` Eric Wong
2016-01-27 20:26         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160113031601.GA28224@dcvr.yhbt.net \
    --to=normalperson@yhbt$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=vleschuk@accesssoftek$(echo .)com \
    --cc=vleschuk@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox