]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3701-add-interactive.sh
pipe_command(): mark stdin descriptor as non-blocking
[thirdparty/git.git] / t / t3701-add-interactive.sh
index b354fb39de839aba1506693ee4a0cd7d4967d656..3b7df9bed5ad3e740090e2dc9b3fecb40479a65f 100755 (executable)
@@ -766,6 +766,19 @@ test_expect_success 'detect bogus diffFilter output' '
        force_color test_must_fail git add -p <y
 '
 
+test_expect_success 'handle very large filtered diff' '
+       git reset --hard &&
+       # The specific number here is not important, but it must
+       # be large enough that the output of "git diff --color"
+       # fills up the pipe buffer. 10,000 results in ~200k of
+       # colored output.
+       test_seq 10000 >test &&
+       test_config interactive.diffFilter cat &&
+       printf y >y &&
+       force_color git add -p >output 2>&1 <y &&
+       git diff-files --exit-code -- test
+'
+
 test_expect_success 'diff.algorithm is passed to `git diff-files`' '
        git reset --hard &&