diff options
Diffstat (limited to 't/t0021-conversion.sh')
-rwxr-xr-x | t/t0021-conversion.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index 718efa04d3..e799e59544 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -252,4 +252,31 @@ test_expect_success "filter: smudge empty file" ' test_cmp expected filtered-empty-in-repo ' +test_expect_success 'disable filter with empty override' ' + test_config_global filter.disable.smudge false && + test_config_global filter.disable.clean false && + test_config filter.disable.smudge false && + test_config filter.disable.clean false && + + echo "*.disable filter=disable" >.gitattributes && + + echo test >test.disable && + git -c filter.disable.clean= add test.disable 2>err && + test_must_be_empty err && + rm -f test.disable && + git -c filter.disable.smudge= checkout -- test.disable 2>err && + test_must_be_empty err +' + +test_expect_success 'diff does not reuse worktree files that need cleaning' ' + test_config filter.counter.clean "echo . >>count; sed s/^/clean:/" && + echo "file filter=counter" >.gitattributes && + test_commit one file && + test_commit two file && + + >count && + git diff-tree -p HEAD && + test_line_count = 0 count +' + test_done |