diff options
| author | Ondřej Pohořelský <opohorel@redhat.com> | 2025-05-26 13:48:25 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-27 08:25:08 -0700 |
| commit | 67cae845d21d3ca0dbdb51ecebb695b175fd1c8e (patch) | |
| tree | 9bce042fde15f5219ef953261c8363b794afc3bc /git-cvsserver.perl | |
| parent | f93ff170b93a1782659637824b25923245ac9dd1 (diff) | |
| download | git-67cae845d21d3ca0dbdb51ecebb695b175fd1c8e.tar.gz | |
cvsserver: remove unused escapeRefName function
Function 'escapeRefName' introduced in 51a7e6dbc9 has never been used.
Despite being dead code, changes in Perl 5.41.4 exposed precedence
warning within its logic, which then caused test failures in t9402 by
logging the warnings to stderr while parsing the code. The affected
tests are t9402.30, t9402.31, t9402.32 and t9402.34.
Remove this unused function to simplify the codebase and stop the
warnings and test failures. Its corresponding unescapeRefName function,
which remains in use, has had its comments updated.
Reported-by: Jitka Plesnikova <jplesnik@redhat.com>
Signed-off-by: Ondřej Pohořelský <opohorel@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-cvsserver.perl')
| -rwxr-xr-x | git-cvsserver.perl | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl index a4e1bad33c..d8d5422cbc 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -4986,13 +4986,13 @@ sub gethistorydense return $result; } -=head2 escapeRefName +=head2 unescapeRefName -Apply an escape mechanism to compensate for characters that +Undo an escape mechanism to compensate for characters that git ref names can have that CVS tags can not. =cut -sub escapeRefName +sub unescapeRefName { my($self,$refName)=@_; @@ -5009,27 +5009,6 @@ sub escapeRefName # = "_-xx-" Where "xx" is the hexadecimal representation of the # desired ASCII character byte. (for anything else) - if(! $refName=~/^[1-9][0-9]*(\.[1-9][0-9]*)*$/) - { - $refName=~s/_-/_-u--/g; - $refName=~s/\./_-p-/g; - $refName=~s%/%_-s-%g; - $refName=~s/[^-_a-zA-Z0-9]/sprintf("_-%02x-",$1)/eg; - } -} - -=head2 unescapeRefName - -Undo an escape mechanism to compensate for characters that -git ref names can have that CVS tags can not. - -=cut -sub unescapeRefName -{ - my($self,$refName)=@_; - - # see escapeRefName() for description of escape mechanism. - $refName=~s/_-([spu]|[0-9a-f][0-9a-f])-/unescapeRefNameChar($1)/eg; # allowed tag names |
