Skip to content

Commit 5cde0d7

Browse files
committed
Merge branch 'op/cvsserver-perl-warning'
Recent versions of Perl started warning against "! A =~ /pattern/" which does not negate the result of the matching. As it turns out that the problematic function is not even called, it was removed. * op/cvsserver-perl-warning: cvsserver: remove unused escapeRefName function
2 parents 8ddea85 + 67cae84 commit 5cde0d7

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

git-cvsserver.perl

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4986,13 +4986,13 @@ sub gethistorydense
49864986
return $result;
49874987
}
49884988

4989-
=head2 escapeRefName
4989+
=head2 unescapeRefName
49904990
4991-
Apply an escape mechanism to compensate for characters that
4991+
Undo an escape mechanism to compensate for characters that
49924992
git ref names can have that CVS tags can not.
49934993
49944994
=cut
4995-
sub escapeRefName
4995+
sub unescapeRefName
49964996
{
49974997
my($self,$refName)=@_;
49984998

@@ -5009,27 +5009,6 @@ 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]*)*$/)
5013-
{
5014-
$refName=~s/_-/_-u--/g;
5015-
$refName=~s/\./_-p-/g;
5016-
$refName=~s%/%_-s-%g;
5017-
$refName=~s/[^-_a-zA-Z0-9]/sprintf("_-%02x-",$1)/eg;
5018-
}
5019-
}
5020-
5021-
=head2 unescapeRefName
5022-
5023-
Undo an escape mechanism to compensate for characters that
5024-
git ref names can have that CVS tags can not.
5025-
5026-
=cut
5027-
sub unescapeRefName
5028-
{
5029-
my($self,$refName)=@_;
5030-
5031-
# see escapeRefName() for description of escape mechanism.
5032-
50335012
$refName=~s/_-([spu]|[0-9a-f][0-9a-f])-/unescapeRefNameChar($1)/eg;
50345013

50355014
# allowed tag names

0 commit comments

Comments
 (0)