git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] quote: make sq_quote_buf_pretty() prettier

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Nov 30, 2026, 14:51 UTC
Message-ID
<030b99fb-1176-4514-9787-fcd733649eb7@gmail.com>
In-Reply-To
<CABQNq+mnfJKohF5F4aQZ8APZk1bvOKo0F6e4FPrMuBvG1CpanA@mail.gmail.com>
Hi Nahid
On 27/11/2026 18:25, Nahid hasan Sagor wrote:
Show 8 quoted lines
>> +       /* '~' 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
Previous: Nahid hasan SagorNext: Junio C Hamano
Message 3 of 10 in “quote: make sq_quote_buf_pretty() prettier”
  1. quote: make sq_quote_buf_pretty() prettierPhillip Wood, Nov 27, 2026
  2. Nahid hasan SagorNov 27, 2026
  3. Phillip WoodNov 30, 2026
  4. Junio C HamanoNov 27, 2026
  5. Phillip WoodNov 30, 2026
  6. Junio C HamanoNov 28, 2026
  7. Phillip WoodNov 30, 2026
  8. D. Ben KnobleNov 30, 2026
  9. Phillip WoodNov 30, 2026
  10. D. Ben KnobleNov 30, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.