Subject: Re: [PATCH v2 2/2] diff --no-index tests: test mode normalization

From: Junio C Hamano <[email-masked]>
Date: Mon, 22 Mar 2021 12:22:05 -0700

Ævar Arnfjörð Bjarmason  <[email-masked]> writes:

> +test_expect_success POSIXPERM,SYMLINKS 'diff --no-index normalizes: mode not like git mode (symlink)' '
> +	ln -s y z &&
> +	X_OID=$(git hash-object --stdin <x) &&
> +	Z_OID=$(echo -n y | git hash-object --stdin) &&

s/echo -n/printf/

t4053-diff-no-index.sh:185: error: echo with option is not portable
(use printf): Z_OID=$(echo -n y | git hash-object --stdin) &&
gmake[1]: *** [Makefile:95: test-lint-shell-syntax] Error 1
gmake[1]: Leaving directory '/home/jch/w/buildfarm/jch/t'
gmake: *** [Makefile:2855: test] Error 2