aboutsummaryrefslogtreecommitdiffstats
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-08-06 12:50:26 -0700
committerJunio C Hamano <gitster@pobox.com>2021-08-06 12:50:26 -0700
commitc87977a0c58c67dea22e1cb50e429e2122b037b9 (patch)
tree3b3ea7750c64bbcc96297ec922fe51c4bf7a36a4 /t/test-lib.sh
parente5a14ddd2d93da4d951fd63d4f78fe2410debe68 (diff)
parent390b44eb2bca5195d524629bccc98d8bbee74410 (diff)
downloadgit-c87977a0c58c67dea22e1cb50e429e2122b037b9.tar.gz
Merge branch 'fc/disable-checkwinsize'
* fc/disable-checkwinsize: test: fix for COLUMNS and bash 5
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index db61081d6b..abcfbed6d6 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -409,6 +409,12 @@ then
verbose=t
fi
+# Since bash 5.0, checkwinsize is enabled by default which does
+# update the COLUMNS variable every time a non-builtin command
+# completes, even for non-interactive shells.
+# Disable that since we are aiming for repeatability.
+test -n "$BASH_VERSION" && shopt -u checkwinsize 2>/dev/null
+
# For repeatability, reset the environment to known value.
# TERM is sanitized below, after saving color control sequences.
LANG=C