@matheusbsbs / matheus-bagliano / commits / 6ec5df61d5
Fork 0

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 <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Đoàn Trần Công Danh committed Mar 25, 2020 at 22:06 UTC 6ec5df61d525fe088ed15951051b17d14a5c243b
1 file changed +1 -1
t/test-lib-functions.sh
+1 -1
@@ -905,7 +905,7 @@ test_expect_code () {
905 # - not all diff versions understand "-u"
906
907 test_cmp() {
908 - $GIT_TEST_CMP "$@"
908 + eval "$GIT_TEST_CMP" '"$@"'
909 }
910
911 # Check that the given config key has the expected value.