Re: [PATCH v2 5/5] refs/debug: trim trailing LF from reflog message
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Dec 2, 2021, 16:24 UTC
- Message-ID
- <CAFQ2z_NYgsiLM1Ffw3O9gAFHVuq68iAfrRbgodHdUPRo5Pm0UA@mail.gmail.com>
- In-Reply-To
- <xmqq1r2y7ork.fsf@gitster.g>
On Mon, Nov 29, 2021 at 8:20 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> > Han-Wen Nienhuys <hanwen@google.com> writes: > > > On Fri, Nov 26, 2021 at 9:16 AM Junio C Hamano <gitster@pobox.com> wrote: > >> > >> The API promises to have only LF, not CRLF, at the end, so > >> strbuf_trim_trailing_newline() is a bit overkill (and if payload > >> happened to end with CR, we would lose it). > > > > it would be best if there was a way to escape characters (ie. "\n" => > > "\\n"). Do we have a function for that? > > Mere escaping would not work in a backward compatible way, without a > trick. It was envisioned that we probably could encode *and* signal
I'm talking about the debug output, which isn't subject to compatibility guarantees.
-- Han-Wen Nienhuys - Google Munich I work 80%. Don't expect answers from me on Fridays. -- Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Paul Manicle, Halimah DeLaine Prado