> On 13 Sep 2016, at 17:42, Junio C Hamano <gits...@pobox.com> wrote:
> Torsten Bögershausen <tbo...@web.de> writes:
>> I would really consider to treat pathnames as binary, and not add a trailing 
>> '\n',
>> are there other opinions ?
> It would be the most consistent if the same format as
> write_name_quoted() is used for this, I would think.

Is that the solution you had in mind?

        quote_c_style(path, &quoted_path, NULL, 0);
        err = packet_write_fmt_gently(process->in, "pathname=%s\n", 

Wouldn't that complicate the pathname parsing on the filter side?
Can't we just define in our filter protocol documentation that our 
"pathname" packet _always_ has a trailing "\n"? That would mean the 
receiver would know a packet "pathname=ABC\n\n" encodes the path
"ABC\n" [1].


[1] Following Torsten's example in 
http://public-inbox.org/git/96554f6d-988d-e0b8-7936-8d0f29a75...@web.de )

Reply via email to