Subject: Re: [PATCH 1/4] test-ref-store: tweaks to for-each-reflog-ent format

From: Junio C Hamano <[email-masked]>
Date: Mon, 30 Aug 2021 14:59:00 -0700

Taylor Blau <[email-masked]> writes:

>> Shouldn't we be instead making sure that the callback functions get
>> the msg argument in a consistent way, whether it is with or without
>> terminating LF, instead of forcing the callers to cope with the
>> differences like this each_reflog() function does in this patch?
>
> ...that is a much more sensible resolution than what I saw in this
> patch. (At the very least, strchr is confusing since we don't expect LF
> characters anywhere in the reflog message, and this is really dealing
> with how the callback is invoked, not the actual bytes-on-disk).
>
> I would probably prefer that the callback be standardized to either
> always or never give a trailing LF.

True, and I agree that the use of LF by on-disk reflog storage
format is just as the record terminator, so I do not mind if we
decide to standardize on a single incomplete line without LF.

Thanks.