diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index dbcd6f623c..5bf5ace56b 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -1863,12 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' ' git tag -l --sort=version:refname ' -run_with_limited_stack () { - (ulimit -s 128 && "$@") -} - -test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true' - # we require ulimit, this excludes Windows test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a deep repo' ' >expect && diff --git a/t/test-lib.sh b/t/test-lib.sh index 5fbd8d4a90..f22c1b260a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1167,6 +1167,12 @@ run_with_limited_cmdline () { test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true' +run_with_limited_stack () { + (ulimit -s 128 && "$@") +} + +test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true' + build_option () { git version --build-options | sed -ne "s/^$1: //p"