Skip to content

Commit b756318

Browse files
committed
cvsserver: avoid precedence problem between ! and %s
With perl-5.41.4 and newer, test t9402-git-cvsserver-refs.sh (specifically t9402.30, t9402.31, t9402.32, t9402.34) fails, because of the new warnings[0] populating cvs.log. Use the 'does not match' operator '!~' directly to express the negated pattern match, resolving the precedence issue. [0] https://metacpan.org/release/ETHER/perl-5.41.12/view/pod/perl5414delta.pod#New-Warnings Reported-by: Jitka Plesnikova <[email protected]> Suggested-by: Jitka Plesnikova <[email protected]> Signed-off-by: Ondřej Pohořelský <[email protected]>
1 parent cb96e16 commit b756318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-cvsserver.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5009,7 +5009,7 @@ sub escapeRefName
50095009
# = "_-xx-" Where "xx" is the hexadecimal representation of the
50105010
# desired ASCII character byte. (for anything else)
50115011

5012-
if(! $refName=~/^[1-9][0-9]*(\.[1-9][0-9]*)*$/)
5012+
if ($refName !~ /^[1-9][0-9]*(\.[1-9][0-9]*)*$/)
50135013
{
50145014
$refName=~s/_-/_-u--/g;
50155015
$refName=~s/\./_-p-/g;

0 commit comments

Comments
 (0)