Subject: Re: [PATCH] git-svn: shorten glob error message

From: Eric Wong <[email-masked]>
Date: Wed, 27 Jan 2016 02:54:08 +0000

Junio C Hamano <[email-masked]> wrote:
> I am not sure if it is a good idea to show */*/* as an example in
> the message (that is an anti-example of 'one set of wildcard' by
> having three stars, isn't it?), but that is not a new issue this
> change introduces.

Actually, going back to commit 570d35c26dfbc40757da6032cdc96afb58cc0037
("git-svn: Allow deep branch names by supporting multi-globs"),
having equal '*' on both sides is all that is required.

Not sure how to improve the wording, though...

> >  	my $state = "left";
> > -	my $die_msg = "Only one set of wildcard directories " .
> > -				"(e.g. '*' or '*/*/*') is supported: '$glob'\n";
> > +	my $die_msg = "Only one set of wildcards " .
> > +				"(e.g. '*' or '*/*/*') is supported: $glob\n";
> >  	for my $part (split(m|/|, $glob)) {
> >  		if ($pattern_ok && $part =~ /[{}]/ &&
> >  			 $part !~ /^\{[^{}]+\}/) {