Message ID | 20240604100814.GA1304520@coredump.intra.peff.net (mailing list archive) |
---|---|
Headers | show |
Series | leak fixes for sparse-checkout code | expand |
On Tue, Jun 04, 2024 at 06:08:14AM -0400, Jeff King wrote: > On Fri, May 31, 2024 at 07:24:34AM -0400, Jeff King wrote: > > > So Patrick nerd-sniped me by asking if my earlier leakfix for git-mv was > > triggered by the test suite. It was, in t7002, but that wasn't enough to > > make the script leak-free. So I figured, how hard could it be to go all > > the way? > > > > Well. It only took a few patches (1-5), but in the process I stumbled on > > a rather tricky interface oddity of add_pattern(), which caused some > > other leaks. The interface is fixed in patch 6, and the matching leak > > goes away in patch 7. Of course, I wanted to make sure it was tested, so > > after poking around I found that t1091 triggered it. > > > > But as you might guess, that didn't make t1091 leak-free. And I couldn't > > bear leaving it on a cliffhanger like that, so patches 8-13 fix the rest > > of the issues triggered by that script. > > > > And along the way we managed to make t1090 and t3602 leak-free, too > > (actually in patch 2, but I didn't notice until the whole thing was > > done). > > > > These should apply on top of jk/leakfixes, since the leak-freeness of > > t7002 depends on the fix there. > > Here's a v2 with a few minor updates, based on review from Patrick. The > restoration of "old_pl" in patch 9 is now done unconditionally (it > doesn't matter in practice due to a bunch of subtle things, but it's the > less surprising and more defensive choice). And a small style update in > patch 13. Thanks, the range-diff looks as expected. Patrick