From: Carlo Marcelo Arenas Belón Date: Sat, 30 Apr 2022 16:32:32 GMT Subject: Re: [PATCH] 2.36 format-patch regression fix Message-ID: <20220430163232.ytvwru4fnylow2jk@carlos-mbp.lan> In-Reply-To: On Sat, Apr 30, 2022 at 12:32:44PM +0200, René Scharfe wrote: > e900d494dc (diff: add an API for deferred freeing, 2021-02-11) added a > way to allow reusing diffopts: the no_free bit. 244c27242f (diff.[ch]: > have diff_free() call clear_pathspec(opts.pathspec), 2022-02-16) made > that mechanism mandatory. > > git format-patch only sets no_free when --output is given, causing it to > forget pathspecs after the first commit. Set no_free unconditionally > instead. I remember when I saw the first commit long ago, and thought; well that is very round about way to reintroduce the UNLEAK removal that might have made it visible. Haven't looked too closely, but considering that we were warned[1] the interface was hard to use and might cause problems later and it did. wouldn't it a better and more secure solution to UNLEAK and remove all this code, at least until it could be refactored cleanly, of course? Carlo [1] https://lore.kernel.org/git/YCUFNVj7qlt9wzlX@coredump.intra.peff.net/