From 8884b57b5cf270d0563d91671080cc7f49b7af22 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 15 May 2015 11:01:48 -0700 Subject: SQUASH --- t/t0021-conversion.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index 6b75567b83..0b77912565 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -204,15 +204,17 @@ test_expect_success EXPENSIVE 'filter large file' ' ! test -s err ' -test_expect_success "filtering empty file should not produce complaints" ' - echo "emptyfile filter=cat" >>.gitattributes && - git config filter.cat.clean cat && - git config filter.cat.smudge cat && - git add . && - git commit -m "cat filter for emptyfile" && - > emptyfile && - git add emptyfile 2>err && - ! grep -Fiqs "bad file descriptor" err +test_expect_success "filtering empty file should work correctly" ' + write_script filter-clean.sh <<-EOF && + echo "Extra Head" && cat + EOF + echo "emptyfile filter=check" >>.gitattributes && + git config filter.check.clean "sh ./filter-clean.sh" && + >emptyfile && + git add emptyfile && + echo "Extra Head" >expect && + git cat-file blob :emptyfile >actual && + test_cmp expect actual ' test_done -- cgit v1.2.1