From: Đoàn Trần Công Danh Date: Wed, 25 Mar 2020 15:06:15 +0000 (+0700) Subject: test-lib-functions: test_cmp: eval $GIT_TEST_CMP X-Git-Tag: v2.27.0-rc0~100^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ec5df61d525fe088ed15951051b17d14a5c243b;p=thirdparty%2Fgit.git test-lib-functions: test_cmp: eval $GIT_TEST_CMP Shell recognises first non-assignment token as command name. With /bin/sh linked to either /bin/bash or /bin/dash, `cd t/perf && ./p0000-perf-lib-sanity.sh -d -i -v` reports: > test_cmp:1: command not found: diff -u Using `eval` to unquote $GIT_TEST_CMP as same as precedence in `git_editor`. Signed-off-by: Đoàn Trần Công Danh Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 352c213d52..ab0e47ae17 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -905,7 +905,7 @@ test_expect_code () { # - not all diff versions understand "-u" test_cmp() { - $GIT_TEST_CMP "$@" + eval "$GIT_TEST_CMP" '"$@"' } # Check that the given config key has the expected value.