aboutsummaryrefslogtreecommitdiff
path: root/t/t0021-conversion.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-05-19 11:08:23 -0700
committerJunio C Hamano <gitster@pobox.com>2015-05-20 10:19:12 -0700
commit0c4dd67a048b39470b9b95912e4912fecc405a85 (patch)
treeb785fea2d6cfedd40a3e9205dd22adf05d474944 /t/t0021-conversion.sh
parent00b7cbfcb36b6679c64ad0566c0fc251f7e979fe (diff)
downloadgit-0c4dd67a048b39470b9b95912e4912fecc405a85.tar.gz
git-0c4dd67a048b39470b9b95912e4912fecc405a85.tar.xz
filter_buffer_or_fd(): ignore EPIPE
We are explicitly ignoring SIGPIPE, as we fully expect that the filter program may not read our output fully. Ignore EPIPE that may come from writing to it as well. A new test was stolen from Jeff's suggestion. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0021-conversion.sh')
-rwxr-xr-xt/t0021-conversion.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
index ca7d2a630..e0200b9f3 100755
--- a/t/t0021-conversion.sh
+++ b/t/t0021-conversion.sh
@@ -204,6 +204,16 @@ test_expect_success 'filtering large input to small output should use little mem
GIT_MMAP_LIMIT=1m GIT_ALLOC_LIMIT=1m git add 30MB
'
+test_expect_success 'filter that does not read is fine' '
+ test-genrandom foo $((128 * 1024 + 1)) >big &&
+ echo "big filter=epipe" >.gitattributes &&
+ git config filter.epipe.clean "echo xyzzy" &&
+ git add big &&
+ git cat-file blob :big >actual &&
+ echo xyzzy >expect &&
+ test_cmp expect actual
+'
+
test_expect_success EXPENSIVE 'filter large file' '
git config filter.largefile.smudge cat &&
git config filter.largefile.clean cat &&