Re: [PATCH v2 3/4] test-lib-functions: add helper for trailing hash
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 13, 2022, 00:55 UTC
- Message-ID
- <xmqqh6y0qfzg.fsf@gitster.g>
- In-Reply-To
- <20221212181438.GA3411@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 6 quoted lines
>> + 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.