From: René Scharfe Date: Wed, 03 Aug 2022 21:56:13 GMT Subject: Re: [PATCH v2] pipe_command(): mark stdin descriptor as non-blocking Message-ID: <41477326-5493-4d3c-246d-8a28969fa73e@web.de> In-Reply-To: Am 03.08.2022 um 19:20 schrieb Jeff King: > On Wed, Aug 03, 2022 at 06:45:23PM +0200, René Scharfe wrote: > >>> +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 && >>> + false && >> >> Isn't this test going to end here, reporting failure before it even gets >> to the interesting part? > > Urgh, whoops. That was from some last-minute tweaking of the comment. > There was also a line: > > git diff --color | wc -c > > before it so I could measure how big the output was for a few values. > > It snuck into the emailed patch, but the actual test runs (including the > Windows CI) didn't include that (since obviously they'd have failed the > test). Without that line the added test hangs for me on the Git for Windows SDK on Windows 11. With the patch below it fails and reports basically nothing: expecting success of 3701.57 '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 test && # test_config interactive.diffFilter cat && # printf y >y && # force_color git add -p >output 2>&1