Re: [PATCH] 2.36 format-patch regression fix
- From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
- Date
- Apr 30, 2022, 16:32 UTC
- Message-ID
- <20220430163232.ytvwru4fnylow2jk@carlos-mbp.lan>
- In-Reply-To
- <c36896a1-6247-123b-4fa3-b7eb24af1897@web.de>
On Sat, Apr 30, 2022 at 12:32:44PM +0200, René Scharfe wrote:
Show 8 quoted lines
> 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/