All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Kousik Sanagavarapu <five231003@gmail.com>,
	 git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: [PATCH] t6300: values containing ')' are broken in ref formats
Date: Tue, 05 Nov 2024 19:05:13 -0800	[thread overview]
Message-ID: <xmqq8qtxqcye.fsf@gitster.g> (raw)
In-Reply-To: <20241106022552.GA816908@coredump.intra.peff.net> (Jeff King's message of "Tue, 5 Nov 2024 21:25:52 -0500")

Jeff King <peff@peff.net> writes:

> I am tempted to say the solution is to expand that "equals" value, and
> possibly add some less-arcane version of the character (maybe "%)"?).
> But it be a break in backwards compatibility if somebody is trying to
> match literal %-chars in their "if" block.

If they were trying to write a literal %, wouldn't they be writing
%% already, not because % followed by a byte without any special
meaning happens to be passed intact by the implementation, but
because that is _the_ right thing to do, when % is used as an
introducer for escape sequences?  So I do agree it would be a change
that breaks backward compatibility but I do not think we want to
stay bug to bug compatible with the current behaviour here.  I am
not sure with the wisdom of %) though.  Wouldn't "%(foo %)" look as
if %( opens and %) closes a group in our language?

So I am very much in favor of this "if condition should be expanded
before comparison" solution.

  reply	other threads:[~2024-11-06  3:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 18:41 [PATCH] t6300: values containing ')' are broken in ref formats Kousik Sanagavarapu
2024-11-06  1:18 ` Junio C Hamano
2024-11-06  2:25   ` Jeff King
2024-11-06  3:05     ` Junio C Hamano [this message]
2024-11-06  3:54       ` Kousik Sanagavarapu
2024-11-06 18:55         ` Jeff King
2024-11-07  2:34           ` Kousik Sanagavarapu
2024-11-06 18:51       ` Jeff King
2024-11-07  2:29         ` Kousik Sanagavarapu
2024-11-07  2:52         ` Junio C Hamano
2024-11-08  4:11           ` Kousik Sanagavarapu
2024-11-08 17:16             ` Jeff King
2024-11-08 18:12               ` Kousik Sanagavarapu
2024-11-06  2:40   ` Kousik Sanagavarapu

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=xmqq8qtxqcye.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=five231003@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.