test-lib.sh: fix prepend_var() quoting issue

Fix a quoting issue in the function introduced in b9638d7286f (test-lib: make $GIT_BUILD_DIR an absolute path, 2022-02-27), running the test suite where the git checkout was on a path with e.g. a space in it would fail. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jun 30, 2022 at 12:18 UTC 361fa321ec25cbbdf21df9309a82e5280c19fa02
1 file changed +2 -2
t/test-lib.sh
+2 -2
@@ -57,14 +57,14 @@ fi
57 #
58 # prepend_var VAR : VALUE
59 prepend_var () {
60 - eval "$1=$3\${$1:+${3:+$2}\$$1}"
60 + eval "$1=\"$3\${$1:+${3:+$2}\$$1}\""
61 }
62
63 # If [AL]SAN is in effect we want to abort so that we notice
64 # problems. The GIT_SAN_OPTIONS variable can be used to set common
65 # defaults shared between [AL]SAN_OPTIONS.
66 prepend_var GIT_SAN_OPTIONS : abort_on_error=1
67 -prepend_var GIT_SAN_OPTIONS : strip_path_prefix=\"$GIT_BUILD_DIR/\"
67 +prepend_var GIT_SAN_OPTIONS : strip_path_prefix="$GIT_BUILD_DIR/"
68
69 # If we were built with ASAN, it may complain about leaks
70 # of program-lifetime variables. Disable it by default to lower