git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cvsserver: avoid precedence problem between ! and %s
@ 2025-05-21  7:45 Ondřej Pohořelský via GitGitGadget
  2025-05-21  7:53 ` Kristoffer Haugsbakk
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Ondřej Pohořelský via GitGitGadget @ 2025-05-21  7:45 UTC (permalink / raw)
  To: git; +Cc: Ondřej Pohořelský,
	Ondřej Pohořelský

From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= <opohorel@redhat.com>

With perl-5.41.4 and newer, git-cvsserver fails to build because of
possible precedence problem[0]

Added parentheses avoid this issue.

Full credit for finding the issue and coming up with the fix goes to
Jitka Plesnikova (jplesnik@redhat.com)

[0] https://metacpan.org/release/ETHER/perl-5.41.12/view/pod/perl5414delta.pod#New-Warnings

Signed-off-by: Ondřej Pohořelský <opohorel@redhat.com>
---
    cvsserver: avoid precedence problem between ! and %s

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1925%2Fopohorel%2Fcvsserver_parentheses-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1925/opohorel/cvsserver_parentheses-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1925

 git-cvsserver.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index a4e1bad33ca..076c10cb2c2 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -5009,7 +5009,7 @@ 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]*)*$/)
+    if(! ($refName=~/^[1-9][0-9]*(\.[1-9][0-9]*)*$/))
     {
         $refName=~s/_-/_-u--/g;
         $refName=~s/\./_-p-/g;

base-commit: cb96e1697ad6e54d11fc920c95f82977f8e438f8
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-05-27 15:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21  7:45 [PATCH] cvsserver: avoid precedence problem between ! and %s Ondřej Pohořelský via GitGitGadget
2025-05-21  7:53 ` Kristoffer Haugsbakk
2025-05-21 10:23 ` [PATCH v2] " Ondřej Pohořelský via GitGitGadget
2025-05-21 15:54   ` Junio C Hamano
2025-05-21 16:02   ` Junio C Hamano
2025-05-21 17:03     ` Junio C Hamano
2025-05-22  7:19       ` Ondrej Pohorelsky
2025-05-22 15:55         ` Junio C Hamano
2025-05-22 17:05           ` Jeff King
2025-05-22 17:56             ` Todd Zullinger
2025-05-22 18:51               ` Junio C Hamano
2025-05-23  4:47                 ` Matthew Ogilvie
2025-05-23 15:48                   ` Junio C Hamano
2025-05-26 13:56                     ` Ondrej Pohorelsky
2025-05-27 15:52                       ` Junio C Hamano
2025-05-22 11:26   ` [PATCH v3] " Ondřej Pohořelský via GitGitGadget
2025-05-26 13:48     ` [PATCH v4] cvsserver: remove unused escapeRefName function Ondřej Pohořelský via GitGitGadget
2025-05-27 15:24       ` Junio C Hamano
2025-05-21 14:58 ` [PATCH] cvsserver: avoid precedence problem between ! and %s Junio C Hamano
2025-05-21 21:48   ` brian m. carlson
2025-05-22  7:31     ` Ondrej Pohorelsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).