Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-25 23:59:20 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-25 23:59:20 +0300
commit023ff4cdf5793437313f481b4ef5b1ec247f2301 (patch)
treefe222b4b3edeb442b7873d89d03556a1e11c1274 /t/t1305-config-include.sh
parent9c9b961d7eb15fb583a2a812088713a68a85f1c0 (diff)
parent08a8ac88d868f3206e8faf0df2502ebc18925c33 (diff)
Merge branch 'ab/test-env'
Many GIT_TEST_* environment variables control various aspects of how our tests are run, but a few followed "non-empty is true, empty or unset is false" while others followed the usual "there are a few ways to spell true, like yes, on, etc., and also ways to spell false, like no, off, etc." convention. * ab/test-env: env--helper: mark a file-local symbol as static tests: make GIT_TEST_FAIL_PREREQS a boolean tests: replace test_tristate with "git env--helper" tests README: re-flow a previously changed paragraph tests: make GIT_TEST_GETTEXT_POISON a boolean t6040 test: stop using global "script" variable config.c: refactor die_bad_number() to not call gettext() early env--helper: new undocumented builtin wrapping git_env_*() config tests: simplify include cycle test
Diffstat (limited to 't/t1305-config-include.sh')
-rwxr-xr-xt/t1305-config-include.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh
index 9571e366f8..d20b4d150d 100755
--- a/t/t1305-config-include.sh
+++ b/t/t1305-config-include.sh
@@ -349,20 +349,13 @@ test_expect_success 'conditional include, onbranch, implicit /** for /' '
'
test_expect_success 'include cycles are detected' '
- cat >.gitconfig <<-\EOF &&
- [test]value = gitconfig
- [include]path = cycle
- EOF
- cat >cycle <<-\EOF &&
- [test]value = cycle
- [include]path = .gitconfig
- EOF
- cat >expect <<-\EOF &&
- gitconfig
- cycle
- EOF
- test_must_fail git config --get-all test.value 2>stderr &&
- test_i18ngrep "exceeded maximum include depth" stderr
+ git init --bare cycle &&
+ git -C cycle config include.path cycle &&
+ git config -f cycle/cycle include.path config &&
+ test_must_fail \
+ env GIT_TEST_GETTEXT_POISON=false \
+ git -C cycle config --get-all test.value 2>stderr &&
+ grep "exceeded maximum include depth" stderr
'
test_done