I suspect that you are preparing a reroll already, but the one that is sitting in 'pu' seems to be flaky in t/t0021 and I seem to see occasional failures from it. I didn't trace where the test goes wrong, but one easy mistake you could make (I am not saying that is the reason of the failure) is to assume your filter will not be called under certain condition (like immediately after you checked out from the index to the working tree), when the automated test goes fast enough and get you into a "racy git" situation---the filter may be asked to filter the contents from the working tree again to re-validate what's there is still what is in the index.