summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Đoàn Trần Công Danh <congdanhqx@gmail.com>2020-03-25 22:06:15 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-25 08:54:37 -0700
commit6ec5df61d525fe088ed15951051b17d14a5c243b (patch)
tree77728a5f7ab1bd1429bbb76f4210b9d2eda434b7 /t
parentt4061: use POSIX compliant regex(7) (diff)
downloadtgif-6ec5df61d525fe088ed15951051b17d14a5c243b.tar.xz
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>
Diffstat (limited to 't')
-rw-r--r--t/test-lib-functions.sh2
1 files changed, 1 insertions, 1 deletions
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.