On Tue, Nov 23, 2021 at 6:10 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Han-Wen Nienhuys <hanwen@xxxxxxxxxx> writes: > > > On Mon, Nov 22, 2021 at 11:27 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > >> > >> If this were truly "user-provided", then I'd argue that all backends > >> should follow whatever the files backend has been doing forever---if > >> the files added LF implicitly, others should, too, because that is > >> pretty much what these "user-provided" callbacks have been expecting > >> to see. > > > > I think it's just wrong. If you pass `msg` to a storage API, you > > should get `msg` when you read it back, not (msg + "\n"). > > If you give a log message "git commit -m 'single line'", you get LF > at the end of the commit message for free. This is no different. > And you know that this is not a "storage API" that stores the input > in verbatim after looking at refs.c::copy_reflog_msg(). I'm talking about refs/refs-internal.h. It seems you want to add something like /* The ref backend should add a '\n' relative to the message supplied to the delete/symref/update functions. */ typedef int for_each_reflog_ent_fn(struct ref_store *ref_store, const char *refname, each_reflog_ent_fn fn, void *cb_data); ? -- 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 -- 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