Re: [PATCH 1/4] test-ref-store: tweaks to for-each-reflog-ent format
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 30, 2021, 21:59 UTC
- Message-ID
- <xmqqv93m1tnf.fsf@gitster.g>
- In-Reply-To
- <YS1GXNoPgjIjO3B7@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 12 quoted lines
>> 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.