Re: [PATCH v7 10/10] convert: add filter.<driver>.process option
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- Sep 15, 2016, 17:23 UTC
- Message-ID
- <5E675A29-628F-4076-A5D9-E359CCF04295@gmail.com>
- In-Reply-To
- <xmqqvaxzvjj0.fsf@gitster.mtv.corp.google.com>
Show 9 quoted lines
> On 13 Sep 2016, at 17:42, Junio C Hamano <gitster@pobox.com> wrote: > > Torsten Bögershausen <tboegi@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, "ed_path, NULL, 0); err = packet_write_fmt_gently(process->in, "pathname=%s\n", quoted_path.buf);
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].
Thanks, Lars
[1] Following Torsten's example in http://public-inbox.org/git/96554f6d-988d-e0b8-7936-8d0f29a7564f@web.de )