From: Junio C Hamano <gitster@pobox.com>
To: "Ondřej Pohořelský via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Ondřej Pohořelský" <opohorel@redhat.com>
Subject: Re: [PATCH] cvsserver: avoid precedence problem between ! and %s
Date: Wed, 21 May 2025 07:58:07 -0700 [thread overview]
Message-ID: <xmqqplg2c8ow.fsf@gitster.g> (raw)
In-Reply-To: <pull.1925.git.1747813502225.gitgitgadget@gmail.com> ("Ondřej Pohořelský via GitGitGadget"'s message of "Wed, 21 May 2025 07:45:02 +0000")
"Ondřej Pohořelský via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> 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]*)*$/))
Interesting. Shouldn't it be using !~ instead if it wants to assert
that the refname does not match the pattern?
> {
> $refName=~s/_-/_-u--/g;
> $refName=~s/\./_-p-/g;
>
> base-commit: cb96e1697ad6e54d11fc920c95f82977f8e438f8
next prev parent reply other threads:[~2025-05-21 14:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Junio C Hamano [this message]
2025-05-21 21:48 ` [PATCH] cvsserver: avoid precedence problem between ! and %s brian m. carlson
2025-05-22 7:31 ` Ondrej Pohorelsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqplg2c8ow.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=opohorel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).