summaryrefslogtreecommitdiff
path: root/t/t1305-config-include.sh
diff options
context:
space:
mode:
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