Git development
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Nahid hasan Sagor <nahidhasan141400@gmail.com>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Cc: git@vger.kernel.org, Ben Knoble <ben.knoble@gmail.com>,
	Harald Nordgren <haraldnordgren@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC PATCH] quote: make sq_quote_buf_pretty() prettier
Date: Mon, 30 Nov 2026 14:51:08 +0000	[thread overview]
Message-ID: <030b99fb-1176-4514-9787-fcd733649eb7@gmail.com> (raw)
In-Reply-To: <CABQNq+mnfJKohF5F4aQZ8APZk1bvOKo0F6e4FPrMuBvG1CpanA@mail.gmail.com>

Hi Nahid

On 27/11/2026 18:25, Nahid hasan Sagor wrote:
>> +       /* '~' is only special if it is the first character */
>> +       if (*p == '~') {
>> +               quote_it = true;
>> +               p++;
>>          }
> 
> I may be misreading, but I think a leading '~' gets lost after the
> 'p++', so it never gets copied by strbuf_add(dst, p, q - p) later. That
> would make "~foo" come out as "'foo'".

You're right - good catch. Junio has pointed out some other problems 
with the handling of '~' as well so I'll rework this.

Thanks

Phillip

  reply	other threads:[~2026-11-30 14:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 16:54 [RFC PATCH] quote: make sq_quote_buf_pretty() prettier Phillip Wood
2026-11-27 18:25 ` Nahid hasan Sagor
2026-11-30 14:51   ` Phillip Wood [this message]
2026-11-27 20:31 ` Junio C Hamano
2026-11-30 16:39   ` Phillip Wood
2026-11-28  0:26 ` Junio C Hamano
2026-11-30 16:40   ` Phillip Wood
2026-11-30 15:19 ` D. Ben Knoble
2026-11-30 16:38   ` Phillip Wood
2026-11-30 17:02     ` D. Ben Knoble

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=030b99fb-1176-4514-9787-fcd733649eb7@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=haraldnordgren@gmail.com \
    --cc=nahidhasan141400@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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