]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Revert "t/test_lib: avoid naked bash arrays in file_lineno"
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 May 2020 16:47:18 +0000 (09:47 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 May 2020 16:47:18 +0000 (09:47 -0700)
This reverts commit 303775a25f0b4ac5d6ad2e96eb4404c24209cad8;
instead of trying to salvage the tap-breaking change, let's
revert the whole thing for now.

t/test-lib.sh

index baf94546da10b369ba1f96d5d40b8ae43dfafe57..1b221951a8e78da99dbec41047a6d9274d686f76 100644 (file)
@@ -677,16 +677,14 @@ die () {
 
 file_lineno () {
        test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0
-       eval '
-               local i
-               for i in ${!BASH_SOURCE[*]}
-               do
-                       case $i,"${BASH_SOURCE[$i]##*/}" in
-                       0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;;
-                       *,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;;
-                       esac
-               done
-       '
+       local i
+       for i in ${!BASH_SOURCE[*]}
+       do
+               case $i,"${BASH_SOURCE[$i]##*/}" in
+               0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;;
+               *,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;;
+               esac
+       done
 }
 
 GIT_EXIT_OK=