Skip to content

Commit 3d7b2b4

Browse files
committed
Revert "t/test_lib: avoid naked bash arrays in file_lineno"
This reverts commit 303775a; instead of trying to salvage the tap-breaking change, let's revert the whole thing for now.
1 parent efcab5b commit 3d7b2b4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

t/test-lib.sh

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -677,16 +677,14 @@ die () {
677677

678678
file_lineno () {
679679
test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0
680-
eval '
681-
local i
682-
for i in ${!BASH_SOURCE[*]}
683-
do
684-
case $i,"${BASH_SOURCE[$i]##*/}" in
685-
0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;;
686-
*,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;;
687-
esac
688-
done
689-
'
680+
local i
681+
for i in ${!BASH_SOURCE[*]}
682+
do
683+
case $i,"${BASH_SOURCE[$i]##*/}" in
684+
0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;;
685+
*,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;;
686+
esac
687+
done
690688
}
691689

692690
GIT_EXIT_OK=

0 commit comments

Comments
 (0)