From: Junio C Hamano Date: Tue, 13 Dec 2022 00:55:47 GMT Subject: Re: [PATCH v2 3/4] test-lib-functions: add helper for trailing hash Message-ID: In-Reply-To: <20221212181438.GA3411@szeder.dev> SZEDER Gábor 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.