Subject: Re: [PATCH v2 3/4] test-lib-functions: add helper for trailing hash

From: Junio C Hamano <[email-masked]>
Date: Tue, 13 Dec 2022 09:55:47 +0900

SZEDER Gábor <[email-masked]> writes:

>> +	test_trailing_hash .git/index >hash &&
>> +	echo $(test_oid zero) >expect &&
>
> Nit: test_oid zero >expect
>
>> +	test_cmp expect hash &&

Unfortunately they are not equivalent.

Usually we write these helpers to terminate their output with LF,
relying on the fact that terminating LF will be dropped when used in
a command substition, e.g. VAR=$(HELPER), but test_oid deviates from
the pattern and does not give the terminating LF to its output.