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