1
0
mirror of https://github.com/git/git.git synced 2024-09-28 23:11:39 +02:00

Merge branch 'cb/test-bash-lineno-fix'

Recent change to show files and line numbers of a breakage during
test (only available when running the tests with bash) were hurting
other shells with syntax errors, which has been corrected.

* cb/test-bash-lineno-fix:
  t/test_lib: avoid naked bash arrays in file_lineno
This commit is contained in:
Junio C Hamano 2020-05-08 14:25:12 -07:00
commit 282ce92448

@ -677,6 +677,7 @@ die () {
file_lineno () {
test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0
eval '
local i
for i in ${!BASH_SOURCE[*]}
do
@ -685,6 +686,7 @@ file_lineno () {
*,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;;
esac
done
'
}
GIT_EXIT_OK=