diff options
| author | Mirko Faina <mroik@delayed.space> | 2026-03-16 02:15:42 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-16 12:43:37 -0700 |
| commit | 48430e44ace97055567294d412dde9bb8adc0fbb (patch) | |
| tree | 82a1e346da2ef0f443e367bc8c768cc7e6a22f7f /t | |
| parent | 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed (diff) | |
| download | git-48430e44ace97055567294d412dde9bb8adc0fbb.tar.xz | |
t0008: improve test cleanup to fix failing test
The "large exclude file ignored in tree" test fails. This is due to an
additional warning message that is generated in the test. "warning:
unable to access 'subdir/.gitignore': Too many levels of symbolic
links", the extra warning that is not supposed to be there, happens
because of some leftover files left by previous tests.
To fix this we improve cleanup on "symlinks not respected in-tree", and
because the tests in t0008 in general have poor cleanup, at the start of
"large exclude file ignored in tree" we search for any leftover
.gitignore and remove them before starting the test.
Improve post-test cleanup and add pre-test cleanup to make sure that we
have a workable environment for the test.
Signed-off-by: Mirko Faina <mroik@delayed.space>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
| -rwxr-xr-x | t/t0008-ignores.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index db8bde280e..e716b5cdfa 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -946,7 +946,7 @@ test_expect_success SYMLINKS 'symlinks respected in info/exclude' ' ' test_expect_success SYMLINKS 'symlinks not respected in-tree' ' - test_when_finished "rm .gitignore" && + test_when_finished "rm -rf subdir .gitignore err actual" && ln -s ignore .gitignore && mkdir subdir && ln -s ignore subdir/.gitignore && @@ -957,6 +957,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' ' test_expect_success EXPENSIVE 'large exclude file ignored in tree' ' test_when_finished "rm .gitignore" && + find . -name .gitignore -exec rm "{}" ";" && dd if=/dev/zero of=.gitignore bs=101M count=1 && git ls-files -o --exclude-standard 2>err && echo "warning: ignoring excessively large pattern file: .gitignore" >expect && |
